Message: Re: fill data in histogram in .root format Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: fill data in histogram in .root format 

Forum: Analysis
Re: Question fill data in histogram in .root format (Maisam Mohammadi)
Re: None Re: fill data in histogram in .root format (Maisam Mohammadi)
Date: 10 Jun, 2015
From: Ivana Hrivnacova <Ivana Hrivnacova>

Hi,

The ntuple can be filled only when a file is open; you should observe warnings of this type when running your modified example:

 -------- WWWW ------- G4Exception-START -------- WWWW -------
 *** G4Exception : Analysis_W001
       issued by : G4RootNtupleManager::GetNtupleDColumn()
       ntupleId 0 columnId 0 does not exist.
 *** This is just a warning message. ***
 -------- WWWW -------- G4Exception-END --------- WWWW -------

You have to move the code where you open the file in BeginOfRunAction:

 void B1RunAction::BeginOfRunAction(const G4Run*)
 { 
  ...

  // make a Rootfile................me.............
  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
  analysisManager->SetVerboseLevel(4);
  G4String fileName = "B1";
  analysisManager->OpenFile(fileName);
  //---------------------------me------------------------
}

Best regards,

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: fill data in histogram in .root format   (Maisam Mohammadi - 10 Jun, 2015)
2 None: Re: fill data in histogram in .root format   (Maisam Mohammadi - 10 Jun, 2015)
3 None: Re: fill data in histogram in .root format   (Maisam Mohammadi - 10 Jun, 2015)
4 None: Re: fill data in histogram in .root format   (Ivana Hrivnacova - 10 Jun, 2015)
 Add Message Add Message
to: "Re: fill data in histogram in .root format"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]