1 |
/** @file |
/** @file |
2 |
* $Author: mocchiut $ |
* $Author: mocchiut $ |
3 |
* $Date: 2009/07/24 13:53:51 $ |
* $Date: 2009/07/29 15:47:23 $ |
4 |
* $Revision: 1.3 $ |
* $Revision: 1.4 $ |
5 |
* |
* |
6 |
* Implementation of the PamelaRun class. |
* Implementation of the PamelaRun class. |
7 |
*/ |
*/ |
514 |
* Write the ROOT files to disk. |
* Write the ROOT files to disk. |
515 |
*/ |
*/ |
516 |
void PamelaRun::WriteFiles(void) { |
void PamelaRun::WriteFiles(void) { |
517 |
|
WriteFilesEasy(); |
518 |
|
return; |
519 |
// Workaround: unlink all friend trees first top avoid to store |
// Workaround: unlink all friend trees first top avoid to store |
520 |
// the links in the header tree file. |
// the links in the header tree file. |
521 |
for (RootTreeMap::iterator i = TTreeMap.begin(); i != TTreeMap.end(); i++) { |
for (RootTreeMap::iterator i = TTreeMap.begin(); i != TTreeMap.end(); i++) { |
543 |
|
|
544 |
softinfo->Delete(); |
softinfo->Delete(); |
545 |
} |
} |
546 |
|
/** |
547 |
|
* Write the ROOT files to disk. |
548 |
|
*/ |
549 |
|
void PamelaRun::WriteFilesEasy() { |
550 |
|
SingleFile->cd(); |
551 |
|
TTree *softinfo = 0; |
552 |
|
Int_t version=GetYODAver(); |
553 |
|
//Int_t version= 60312; |
554 |
|
//printf("version = %f \n",version); |
555 |
|
softinfo = new TTree("SoftInfo","YODA software info"); |
556 |
|
softinfo->Branch("SoftInfo",&version,"version/I"); |
557 |
|
softinfo->Fill(); |
558 |
|
|
559 |
|
SingleFile->Write("",TObject::kOverwrite); |
560 |
|
|
561 |
|
softinfo->Delete(); |
562 |
|
} |
563 |
/** |
/** |
564 |
* Fill all ROOT trees of a certain type that were opened for writing. |
* Fill all ROOT trees of a certain type that were opened for writing. |
565 |
* @param type the package type of the trees to fill. |
* @param type the package type of the trees to fill. |