/[PAMELA software]/chewbacca/event/PamelaRun.cpp
ViewVC logotype

Diff of /chewbacca/event/PamelaRun.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by mocchiut, Fri Jul 24 13:53:51 2009 UTC revision 1.5 by mocchiut, Wed Dec 30 14:50:01 2009 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Author: mocchiut $   * $Author: mocchiut $
3   * $Date: 2008/12/18 14:47:09 $   * $Date: 2009/07/29 15:47:23 $
4   * $Revision: 1.2 $   * $Revision: 1.4 $
5   *   *
6   * Implementation of the PamelaRun class.   * Implementation of the PamelaRun class.
7   */   */
# Line 51  PamelaRun::PamelaRun(std::string fileNam Line 51  PamelaRun::PamelaRun(std::string fileNam
51    Path(path),    Path(path),
52    Run(fileName),    Run(fileName),
53    RunNumber(1),//veirificare se è possibilie eliminare questa variabile    RunNumber(1),//veirificare se è possibilie eliminare questa variabile
54      compression(compr),
55    Multiple(multiple),    Multiple(multiple),
56    SingleFile(0),    SingleFile(0){
   compression(compr){  
57    
58    RunExists(fileName);    RunExists(fileName);
59    info = RunInfoYoda(this);    info = RunInfoYoda(this);
# Line 514  void PamelaRun::WriteHeaders(Algorithm* Line 514  void PamelaRun::WriteHeaders(Algorithm*
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++) {
# Line 541  void PamelaRun::WriteFiles(void) { Line 543  void PamelaRun::WriteFiles(void) {
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.

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.23