Ignore:
Timestamp:
Jan 8, 2010, 3:02:48 PM (15 years ago)
Author:
garnier
Message:

update to geant4.9.3

Location:
trunk/examples/extended/analysis/AnaEx01/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/extended/analysis/AnaEx01/src/AnaEx01AnalysisManager.cc

    r807 r1230  
    2525//
    2626//
    27 // $Id: AnaEx01AnalysisManager.cc,v 1.16 2006/06/29 16:33:42 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: AnaEx01AnalysisManager.cc,v 1.18 2009/05/13 08:33:17 gbarrand Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    7070
    7171  // Create a tree-like container to handle histograms.
    72   // This tree is associated to a AnaEx01.aida file. 
    73   //std::string opts = "compress=yes";
    74   std::string opts = "compress=no";
    75   fTree = treeFactory->create("AnaEx01.aida","xml",false,true,opts);
    76   //std::string opts = "export=root";
    77   //fTree = treeFactory->create("AnaEx01.root","ROOT",false,true,opts);
     72  // This tree is associated to a AnaEx01.<format> file. 
     73
     74  std::string h_name_EAbs("EAbs");
     75  std::string h_name_LAbs("LAbs");
     76  std::string h_name_EGap("EGap");
     77  std::string h_name_LGap("LGap");
     78  std::string t_name("AnaEx01");
     79
     80  // File format :
     81  std::string format("xml");
     82  //std::string format("hbook");
     83  //std::string format("root");
     84
     85  std::string file("AnaEx01");
     86  std::string ext;
     87  ext = "."+format;
     88
     89  std::string opts;
     90  if(format=="hbook") {
     91    opts = "compress=no";
     92
     93    h_name_EAbs = "1";
     94    h_name_LAbs = "2";
     95    h_name_EGap = "3";
     96    h_name_LGap = "4";
     97    t_name = "101";
     98
     99  } else if(format=="root") {
     100    opts = "compress=yes";
     101
     102  } else if(format=="xml") {
     103    ext = ".aida";
     104    opts = "compress=no";
     105
     106  } else {
     107    G4cout << "storage format \"" << format << "\""
     108           << " not handled in this example."
     109           << G4endl;
     110    return;
     111  }
     112
     113  file += ext;
     114  fTree = treeFactory->create(file,format,false,true,opts);
    78115
    79116  // Factories are not "managed" by an AIDA analysis system.
     
    81118  delete treeFactory;
    82119
    83   if(!fTree) return;
     120  if(!fTree) {
     121    G4cout << "can't create tree associated to file \"" << file << "\"."
     122           << G4endl;
     123    return;
     124  }
    84125
    85126  fTree->mkdir("histograms");
     
    90131    fAIDA->createHistogramFactory(*fTree);
    91132  if(histoFactory) {
    92     fEAbs = histoFactory->createHistogram1D("EAbs",100,0,100);
    93     fLAbs = histoFactory->createHistogram1D("LAbs",100,0,100);
    94     fEGap = histoFactory->createHistogram1D("EGap",100,0,10);
    95     fLGap = histoFactory->createHistogram1D("LGap",100,0,100);
     133    fEAbs = histoFactory->createHistogram1D(h_name_EAbs,"EAbs",100,0,100);
     134    if(!fEAbs) G4cout << "can't create histo EAbs." << G4endl;
     135    fLAbs = histoFactory->createHistogram1D(h_name_LAbs,"LAbs",100,0,100);
     136    if(!fLAbs) G4cout << "can't create histo LAbs." << G4endl;
     137    fEGap = histoFactory->createHistogram1D(h_name_EGap,"EGap",100,0,10);
     138    if(!fEGap) G4cout << "can't create histo EGap." << G4endl;
     139    fLGap = histoFactory->createHistogram1D(h_name_LGap,"LGap",100,0,100);
     140    if(!fLGap) G4cout << "can't create histo LGap." << G4endl;
    96141    delete histoFactory;
    97142  }
     
    106151   
    107152    // Create a tuple :
    108     fTuple = tupleFactory->create("AnaEx01","AnaEx01",
     153    fTuple = tupleFactory->create(t_name,"AnaEx01",
    109154      "double EAbs,double LAbs,double EGap,double LGap");
     155    if(!fTuple) G4cout << "can't create tuple." << G4endl;
    110156   
    111157    delete tupleFactory;
    112158  }
    113159
     160  fTree->cd("..");
    114161}
    115162AnaEx01AnalysisManager::~AnaEx01AnalysisManager() {
  • trunk/examples/extended/analysis/AnaEx01/src/AnaEx01CalorHit.cc

    r807 r1230  
    2626//
    2727// $Id: AnaEx01CalorHit.cc,v 1.6 2006/06/29 16:33:44 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/extended/analysis/AnaEx01/src/AnaEx01CalorimeterSD.cc

    r807 r1230  
    2626//
    2727// $Id: AnaEx01CalorimeterSD.cc,v 1.5 2006/06/29 16:33:46 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/extended/analysis/AnaEx01/src/AnaEx01DetectorConstruction.cc

    r807 r1230  
    2626//
    2727// $Id: AnaEx01DetectorConstruction.cc,v 1.5 2006/06/29 16:33:49 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/extended/analysis/AnaEx01/src/AnaEx01DetectorMessenger.cc

    r807 r1230  
    2626//
    2727// $Id: AnaEx01DetectorMessenger.cc,v 1.5 2006/06/29 16:33:51 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/extended/analysis/AnaEx01/src/AnaEx01EventAction.cc

    r807 r1230  
    2626//
    2727// $Id: AnaEx01EventAction.cc,v 1.6 2006/06/29 16:33:53 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/extended/analysis/AnaEx01/src/AnaEx01PhysicsList.cc

    r807 r1230  
    2626//
    2727// $Id: AnaEx01PhysicsList.cc,v 1.5 2006/06/29 16:33:55 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/extended/analysis/AnaEx01/src/AnaEx01PrimaryGeneratorAction.cc

    r807 r1230  
    2626//
    2727// $Id: AnaEx01PrimaryGeneratorAction.cc,v 1.5 2006/06/29 16:33:57 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/extended/analysis/AnaEx01/src/AnaEx01PrimaryGeneratorMessenger.cc

    r807 r1230  
    2626//
    2727// $Id: AnaEx01PrimaryGeneratorMessenger.cc,v 1.5 2006/06/29 16:33:59 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/extended/analysis/AnaEx01/src/AnaEx01RunAction.cc

    r807 r1230  
    2626//
    2727// $Id: AnaEx01RunAction.cc,v 1.7 2006/06/29 16:34:01 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/extended/analysis/AnaEx01/src/AnaEx01SteppingAction.cc

    r807 r1230  
    2626//
    2727// $Id: AnaEx01SteppingAction.cc,v 1.7 2006/06/29 16:34:03 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/examples/extended/analysis/AnaEx01/src/AnaEx01SteppingVerbose.cc

    r807 r1230  
    2626//
    2727// $Id: AnaEx01SteppingVerbose.cc,v 1.7 2006/06/29 16:34:05 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
Note: See TracChangeset for help on using the changeset viewer.