--- chewbacca/event/PamelaRun.cpp 2009/07/24 13:53:51 1.3 +++ chewbacca/event/PamelaRun.cpp 2009/12/30 14:50:01 1.5 @@ -1,7 +1,7 @@ /** @file * $Author: mocchiut $ - * $Date: 2008/12/18 14:47:09 $ - * $Revision: 1.2 $ + * $Date: 2009/07/29 15:47:23 $ + * $Revision: 1.4 $ * * Implementation of the PamelaRun class. */ @@ -51,9 +51,9 @@ Path(path), Run(fileName), RunNumber(1),//veirificare se รจ possibilie eliminare questa variabile + compression(compr), Multiple(multiple), - SingleFile(0), - compression(compr){ + SingleFile(0){ RunExists(fileName); info = RunInfoYoda(this); @@ -514,6 +514,8 @@ * Write the ROOT files to disk. */ void PamelaRun::WriteFiles(void) { + WriteFilesEasy(); + return; // Workaround: unlink all friend trees first top avoid to store // the links in the header tree file. for (RootTreeMap::iterator i = TTreeMap.begin(); i != TTreeMap.end(); i++) { @@ -541,7 +543,23 @@ softinfo->Delete(); } - +/** + * Write the ROOT files to disk. + */ +void PamelaRun::WriteFilesEasy() { + SingleFile->cd(); + TTree *softinfo = 0; + Int_t version=GetYODAver(); + //Int_t version= 60312; + //printf("version = %f \n",version); + softinfo = new TTree("SoftInfo","YODA software info"); + softinfo->Branch("SoftInfo",&version,"version/I"); + softinfo->Fill(); + + SingleFile->Write("",TObject::kOverwrite); + + softinfo->Delete(); +} /** * Fill all ROOT trees of a certain type that were opened for writing. * @param type the package type of the trees to fill.