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

Diff of /yoda/event/PamelaRun.cpp

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

revision 2.5 by kusanagi, Thu Dec 16 17:32:46 2004 UTC revision 4.0 by kusanagi, Sun Mar 6 04:33:01 2005 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Author: kusanagi $   * $Author: kusanagi $
3   * $Date: 2004/12/09 08:47:42 $   * $Date: 2005/03/06 04:29:14 $
4   * $Revision: 2.4 $   * $Revision: 3.1 $
5   *   *
6   * Implementation of the PamelaRun class.   * Implementation of the PamelaRun class.
7   */   */
# Line 270  static void AddAllAsFriend(TChain* tree, Line 270  static void AddAllAsFriend(TChain* tree,
270    }    }
271    TFile* File = new TFile(BaseFileName.c_str(), "read");    TFile* File = new TFile(BaseFileName.c_str(), "read");
272    if (!File->IsOpen()) {    if (!File->IsOpen()) {
273      logger->warn("Could not open file " + BaseFileName + " for reading.");      logger->error("Could not open file " + BaseFileName + " for reading.");
274      return;      return;
275    }    }
276    TList* list = File->GetListOfKeys();    TList* list = File->GetListOfKeys();
# Line 420  TTree* PamelaRun::CreateTTree(Algorithm* Line 420  TTree* PamelaRun::CreateTTree(Algorithm*
420    AlgorithmInfo ai(algo);    AlgorithmInfo ai(algo);
421    ai.Write();    ai.Write();
422    info.Write();    info.Write();
423    logger->info("Creating file " + FileName + " with Tree " + TreeName);    logger->debug("Creating file " + FileName + " with Tree " + TreeName);
424    return tree;    return tree;
425  }  }
426    
# Line 496  void PamelaRun::WriteHeader(Algorithm* a Line 496  void PamelaRun::WriteHeader(Algorithm* a
496    std::stringstream temp;    std::stringstream temp;
497    //temp.str("");    //temp.str("");
498    //temp << "Created file" << FileName.c_str() << " with Tree Pscu" ;    //temp << "Created file" << FileName.c_str() << " with Tree Pscu" ;
499    //logger->info(temp.str());    //logger->debug(temp.str());
500    tree->Branch(GetDefaultBranchName(&header).c_str(),    tree->Branch(GetDefaultBranchName(&header).c_str(),
501                 (*subpacket)->Class()->GetName(), subpacket);                 (*subpacket)->Class()->GetName(), subpacket);
502    TTreeMap.insert(RootTreeMap::value_type(type, tree));    TTreeMap.insert(RootTreeMap::value_type(type, tree));
# Line 556  void PamelaRun::WriteHeaders(Algorithm* Line 556  void PamelaRun::WriteHeaders(Algorithm*
556      WriteHeader(algo, subpacket, PacketType::TrgAlarm);          WriteHeader(algo, subpacket, PacketType::TrgAlarm);    
557      WriteHeader(algo, subpacket, PacketType::TofAlarm);      WriteHeader(algo, subpacket, PacketType::TofAlarm);
558      WriteHeader(algo, subpacket, PacketType::S4Alarm);      WriteHeader(algo, subpacket, PacketType::S4Alarm);
559        WriteHeader(algo, subpacket, PacketType::TsbT);
560        WriteHeader(algo, subpacket, PacketType::TsbB);
561  }  }
562    
563  /**  /**
# Line 584  void PamelaRun::WriteFiles(void) { Line 586  void PamelaRun::WriteFiles(void) {
586   * @param type the package type of the trees to fill.   * @param type the package type of the trees to fill.
587   */   */
588  void PamelaRun::FillTrees(const PacketType* type) {  void PamelaRun::FillTrees(const PacketType* type) {
589    for (TTreeList::iterator j = WritingRootTrees[type].begin();    try{
590         j != WritingRootTrees[type].end(); j++) {      for (TTreeList::iterator j = WritingRootTrees[type].begin();
591      (*j)->Fill();          j != WritingRootTrees[type].end(); j++) {
592      ;              (*j)->Fill();
593        }
594      } catch(Exception exc){
595        logger->fatal("ORRORE!!!");
596    }    }
597  }  }
598    

Legend:
Removed from v.2.5  
changed lines
  Added in v.4.0

  ViewVC Help
Powered by ViewVC 1.1.23