#include <G4VAnalysisManager.hh>
Inheritance diagram for G4VAnalysisManager:
Definition at line 42 of file G4VAnalysisManager.hh.
G4VAnalysisManager::G4VAnalysisManager | ( | const G4String & | type = "" |
) |
Definition at line 37 of file G4VAnalysisManager.cc.
00038 : fVerboseLevel(0), 00039 fActivation(false), 00040 fFirstHistoId(0), 00041 fFirstNtupleColumnId(0), 00042 fFileName(""), 00043 fHistoDirectoryName(""), 00044 fNtupleDirectoryName(""), 00045 fLockFirstHistoId(false), 00046 fLockFirstNtupleColumnId(false), 00047 fLockFileName(false), 00048 fLockHistoDirectoryName(false), 00049 fLockNtupleDirectoryName(false), 00050 fVerboseL1(type,1), 00051 fVerboseL2(type,2), 00052 fVerboseL3(type,3), 00053 fVerboseL4(type,4), 00054 fpVerboseL1(0), 00055 fpVerboseL2(0), 00056 fpVerboseL3(0), 00057 fpVerboseL4(0), 00058 fMessenger(0), 00059 fNofActiveObjects(0), 00060 fNofAsciiObjects(0), 00061 fH1Informations(), 00062 fH2Informations() 00063 { 00064 fMessenger = new G4AnalysisMessenger(this); 00065 }
G4VAnalysisManager::~G4VAnalysisManager | ( | ) | [virtual] |
void G4VAnalysisManager::AddH1Information | ( | const G4String & | name, | |
const G4String & | unitName, | |||
const G4String & | fcnName, | |||
G4double | unit, | |||
G4Fcn | fx | |||
) | [protected] |
Definition at line 79 of file G4VAnalysisManager.cc.
Referenced by G4XmlAnalysisManager::CreateH1(), and G4RootAnalysisManager::CreateH1().
00083 { 00084 fH1Informations.push_back( 00085 new G4HnInformation(name, unitName, unitName, fcnName, fcnName, 00086 unit, unit, fcn, fcn)); 00087 ++fNofActiveObjects; 00088 }
void G4VAnalysisManager::AddH2Information | ( | const G4String & | name, | |
const G4String & | xunitName, | |||
const G4String & | yunitName, | |||
const G4String & | xfcnName, | |||
const G4String & | yfcnName, | |||
G4double | xunit, | |||
G4double | yunit, | |||
G4Fcn | fx, | |||
G4Fcn | fy | |||
) | [protected] |
Definition at line 91 of file G4VAnalysisManager.cc.
Referenced by G4XmlAnalysisManager::CreateH2(), and G4RootAnalysisManager::CreateH2().
00098 { 00099 fH2Informations.push_back( 00100 new G4HnInformation(name, xunitName, yunitName, xfcnName, yfcnName, 00101 xunit, yunit, xfcn, yfcn)); 00102 ++fNofActiveObjects; 00103 }
virtual G4bool G4VAnalysisManager::AddNtupleRow | ( | ) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
virtual G4bool G4VAnalysisManager::CloseFile | ( | ) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
virtual G4int G4VAnalysisManager::CreateH1 | ( | const G4String & | name, | |
const G4String & | title, | |||
G4int | nbins, | |||
G4double | xmin, | |||
G4double | xmax, | |||
const G4String & | unitName = "none" , |
|||
const G4String & | fcnName = "none" | |||
) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Referenced by G4AnalysisMessenger::SetNewValue().
virtual G4int G4VAnalysisManager::CreateH2 | ( | const G4String & | name, | |
const G4String & | title, | |||
G4int | nxbins, | |||
G4double | xmin, | |||
G4double | xmax, | |||
G4int | nybins, | |||
G4double | ymin, | |||
G4double | ymax, | |||
const G4String & | xunitName = "none" , |
|||
const G4String & | yunitName = "none" , |
|||
const G4String & | xfcnName = "none" , |
|||
const G4String & | yfcnName = "none" | |||
) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Referenced by G4AnalysisMessenger::SetNewValue().
virtual void G4VAnalysisManager::CreateNtuple | ( | const G4String & | name, | |
const G4String & | title | |||
) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
virtual G4bool G4VAnalysisManager::FillH1 | ( | G4int | id, | |
G4double | value, | |||
G4double | weight = 1.0 | |||
) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
virtual G4bool G4VAnalysisManager::FillH2 | ( | G4int | id, | |
G4double | xvalue, | |||
G4double | yvalue, | |||
G4double | weight = 1.0 | |||
) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
virtual void G4VAnalysisManager::FinishNtuple | ( | ) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
G4bool G4VAnalysisManager::GetActivation | ( | ObjectType | type, | |
G4int | id | |||
) | const [protected] |
Definition at line 172 of file G4VAnalysisManager.cc.
References G4HnInformation::fActivation, and GetInformation().
00173 { 00174 G4HnInformation* info = GetInformation(type, id); 00175 00176 if ( ! info ) return true; 00177 00178 return info->fActivation; 00179 }
G4bool G4VAnalysisManager::GetActivation | ( | ) | const [inline] |
Definition at line 296 of file G4VAnalysisManager.hh.
References fActivation.
Referenced by G4XmlAnalysisManager::FillH1(), G4RootAnalysisManager::FillH1(), G4XmlAnalysisManager::FillH2(), G4RootAnalysisManager::FillH2(), GetH1Activation(), and GetH2Activation().
00296 { 00297 return fActivation; 00298 }
G4bool G4VAnalysisManager::GetAscii | ( | ObjectType | type, | |
G4int | id | |||
) | const [protected] |
Definition at line 182 of file G4VAnalysisManager.cc.
References G4HnInformation::fAscii, and GetInformation().
Referenced by GetH1Ascii(), and GetH2Ascii().
00183 { 00184 G4HnInformation* info = GetInformation(type, id); 00185 00186 if ( ! info ) return false; 00187 00188 return info->fAscii; 00189 }
G4String G4VAnalysisManager::GetFileName | ( | ) | const [inline, virtual] |
Definition at line 272 of file G4VAnalysisManager.hh.
References fFileName.
00272 { 00273 return fFileName; 00274 }
G4String G4VAnalysisManager::GetFileType | ( | ) | const |
Definition at line 517 of file G4VAnalysisManager.cc.
References fVerboseL1, G4AnalysisVerbose::GetType(), and G4String::toLower().
Referenced by GetFullFileName(), G4XmlAnalysisManager::OpenFile(), G4RootAnalysisManager::OpenFile(), and G4CsvAnalysisManager::OpenFile().
00518 { 00519 G4String fileType = fVerboseL1.GetType(); 00520 fileType.toLower(); 00521 return fileType; 00522 }
G4String G4VAnalysisManager::GetFullFileName | ( | ) | const [virtual] |
Definition at line 329 of file G4VAnalysisManager.cc.
References G4String::append(), fFileName, and GetFileType().
Referenced by G4XmlAnalysisManager::CloseFile(), G4RootAnalysisManager::CloseFile(), G4CsvAnalysisManager::CloseFile(), G4XmlAnalysisManager::Write(), and G4RootAnalysisManager::Write().
00330 { 00331 G4String name(fFileName); 00332 if ( name.find(".") == std::string::npos ) { 00333 name.append("."); 00334 name.append(GetFileType()); 00335 } 00336 00337 return name; 00338 }
Definition at line 203 of file G4VAnalysisManager.cc.
References G4endl, G4Exception(), G4FcnIdentity(), and JustWarning.
Referenced by G4XmlAnalysisManager::CreateH1(), G4RootAnalysisManager::CreateH1(), G4XmlAnalysisManager::CreateH2(), G4RootAnalysisManager::CreateH2(), G4XmlAnalysisManager::SetH1(), G4RootAnalysisManager::SetH1(), G4XmlAnalysisManager::SetH2(), and G4RootAnalysisManager::SetH2().
00204 { 00205 G4Fcn fcn = G4FcnIdentity; 00206 if ( fcnName != "none" ) { 00207 if ( fcnName == "log" ) fcn = std::log; 00208 else if ( fcnName == "log10") fcn = std::log10; 00209 else if ( fcnName == "exp" ) fcn = std::exp; 00210 else { 00211 G4ExceptionDescription description; 00212 description 00213 << " \"" << fcnName << "\" function is not supported." << G4endl 00214 << " " << "No function will be applied to h1 values."; 00215 G4Exception("G4AnalysisMessenger::GetFunction", 00216 "Analysis_W013", JustWarning, description); 00217 } 00218 } 00219 return fcn; 00220 }
Definition at line 316 of file G4VAnalysisManager.hh.
References GetActivation(), and kH1.
00316 { 00317 return GetActivation(kH1, id); 00318 }
G4HnInformation * G4VAnalysisManager::GetH1Information | ( | G4int | id | ) | const [protected] |
Definition at line 387 of file G4VAnalysisManager.cc.
References fFirstHistoId, G4Exception(), GetNofH1s(), and JustWarning.
Referenced by GetInformation(), G4XmlAnalysisManager::SetH1(), G4RootAnalysisManager::SetH1(), G4XmlAnalysisManager::Write(), G4RootAnalysisManager::Write(), G4XmlAnalysisManager::WriteOnAscii(), and G4RootAnalysisManager::WriteOnAscii().
00388 { 00389 G4int index = id - fFirstHistoId; 00390 if ( index < 0 || index >= GetNofH1s() ) { 00391 G4ExceptionDescription description; 00392 description << " " << "histo " << id << " does not exist."; 00393 G4Exception("G4VAnalysisManager::GetH1Information()", 00394 "Analysis_W007", JustWarning, description); 00395 return 0; 00396 } 00397 return fH1Informations[index]; 00398 }
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Definition at line 336 of file G4VAnalysisManager.hh.
References GetActivation(), and kH2.
00336 { 00337 return GetActivation(kH2, id); 00338 }
G4HnInformation * G4VAnalysisManager::GetH2Information | ( | G4int | id | ) | const [protected] |
Definition at line 401 of file G4VAnalysisManager.cc.
References fFirstHistoId, G4Exception(), GetNofH2s(), and JustWarning.
Referenced by GetInformation(), G4XmlAnalysisManager::SetH2(), G4RootAnalysisManager::SetH2(), G4XmlAnalysisManager::Write(), and G4RootAnalysisManager::Write().
00402 { 00403 G4int index = id - fFirstHistoId; 00404 if ( index < 0 || index >= GetNofH2s() ) { 00405 G4ExceptionDescription description; 00406 description << " " << "histo " << id << " does not exist."; 00407 G4Exception("G4VAnalysisManager::GetH2Information()", 00408 "Analysis_W007", JustWarning, description); 00409 return 0; 00410 } 00411 return fH2Informations[index]; 00412 }
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
G4String G4VAnalysisManager::GetHistoDirectoryName | ( | ) | const [inline, virtual] |
Definition at line 276 of file G4VAnalysisManager.hh.
References fHistoDirectoryName.
00276 { 00277 return fHistoDirectoryName; 00278 }
G4HnInformation * G4VAnalysisManager::GetInformation | ( | ObjectType | type, | |
G4int | id | |||
) | const [protected] |
Definition at line 415 of file G4VAnalysisManager.cc.
References FatalException, G4Exception(), GetH1Information(), GetH2Information(), kH1, kH2, and kNtuple.
Referenced by G4XmlAnalysisManager::FillH1(), G4RootAnalysisManager::FillH1(), G4XmlAnalysisManager::FillH2(), G4RootAnalysisManager::FillH2(), GetActivation(), GetAscii(), G4XmlAnalysisManager::GetH1Width(), G4RootAnalysisManager::GetH1Width(), G4XmlAnalysisManager::GetH1Xmax(), G4RootAnalysisManager::GetH1Xmax(), G4XmlAnalysisManager::GetH1Xmin(), G4RootAnalysisManager::GetH1Xmin(), G4XmlAnalysisManager::GetH2Xmax(), G4RootAnalysisManager::GetH2Xmax(), G4XmlAnalysisManager::GetH2Xmin(), G4RootAnalysisManager::GetH2Xmin(), G4XmlAnalysisManager::GetH2XWidth(), G4RootAnalysisManager::GetH2XWidth(), G4XmlAnalysisManager::GetH2Ymax(), G4RootAnalysisManager::GetH2Ymax(), G4XmlAnalysisManager::GetH2Ymin(), G4RootAnalysisManager::GetH2Ymin(), G4XmlAnalysisManager::GetH2YWidth(), G4RootAnalysisManager::GetH2YWidth(), GetName(), GetXUnit(), GetYUnit(), SetActivation(), and SetAscii().
00416 { 00417 switch ( objType ) { 00418 case kH1: 00419 return GetH1Information(id); 00420 break; 00421 00422 case kH2: 00423 return GetH2Information(id); 00424 break; 00425 00426 case kNtuple: 00427 default: 00428 return 0; 00429 break; 00430 } 00431 00432 // Cannot reach this line 00433 G4ExceptionDescription description; 00434 description << "Wrong object type."; 00435 G4Exception("G4VAnalysisManager::SetFirstHistoId()", 00436 "Analysis_W010", FatalException, description); 00437 return 0; 00438 }
G4String G4VAnalysisManager::GetName | ( | ObjectType | type, | |
G4int | id | |||
) | const [protected] |
Definition at line 142 of file G4VAnalysisManager.cc.
References G4HnInformation::fName, and GetInformation().
Referenced by GetH1Name(), and GetH2Name().
00143 { 00144 G4HnInformation* info = GetInformation(type, id); 00145 00146 if ( ! info ) return ""; 00147 00148 return info->fName; 00149 }
G4int G4VAnalysisManager::GetNofH1s | ( | ) | const [inline, virtual] |
G4int G4VAnalysisManager::GetNofH2s | ( | ) | const [inline, virtual] |
G4String G4VAnalysisManager::GetNtupleDirectoryName | ( | ) | const [inline, virtual] |
Definition at line 280 of file G4VAnalysisManager.hh.
References fNtupleDirectoryName.
00280 { 00281 return fNtupleDirectoryName; 00282 }
G4String G4VAnalysisManager::GetType | ( | ) | const [inline] |
Definition at line 288 of file G4VAnalysisManager.hh.
References fVerboseL1, and G4AnalysisVerbose::GetType().
00288 { 00289 return fVerboseL1.GetType(); 00290 }
Definition at line 192 of file G4VAnalysisManager.cc.
References G4UnitDefinition::GetValueOf().
Referenced by G4XmlAnalysisManager::CreateH1(), G4RootAnalysisManager::CreateH1(), G4XmlAnalysisManager::CreateH2(), G4RootAnalysisManager::CreateH2(), G4XmlAnalysisManager::SetH1(), G4RootAnalysisManager::SetH1(), G4XmlAnalysisManager::SetH2(), and G4RootAnalysisManager::SetH2().
00193 { 00194 G4double value = 1.; 00195 if ( unit != "none" ) { 00196 value = G4UnitDefinition::GetValueOf(unit); 00197 if ( value == 0. ) value = 1.; 00198 } 00199 return value; 00200 }
G4int G4VAnalysisManager::GetVerboseLevel | ( | ) | const [inline, virtual] |
Definition at line 284 of file G4VAnalysisManager.hh.
References fVerboseLevel.
00284 { 00285 return fVerboseLevel; 00286 }
G4double G4VAnalysisManager::GetXUnit | ( | ObjectType | type, | |
G4int | id | |||
) | const [protected] |
Definition at line 152 of file G4VAnalysisManager.cc.
References G4HnInformation::fXUnit, and GetInformation().
Referenced by G4XmlAnalysisManager::FillH1(), G4XmlAnalysisManager::FillH2(), GetH1Unit(), and GetH2XUnit().
00153 { 00154 G4HnInformation* info = GetInformation(type, id); 00155 00156 if ( ! info ) return 1.0; 00157 00158 return info->fXUnit; 00159 }
G4double G4VAnalysisManager::GetYUnit | ( | ObjectType | type, | |
G4int | id | |||
) | const [protected] |
Definition at line 162 of file G4VAnalysisManager.cc.
References G4HnInformation::fYUnit, and GetInformation().
Referenced by G4XmlAnalysisManager::FillH2(), and GetH2YUnit().
00163 { 00164 G4HnInformation* info = GetInformation(type, id); 00165 00166 if ( ! info ) return 1.0; 00167 00168 return info->fYUnit; 00169 }
G4bool G4VAnalysisManager::IsActive | ( | ) | const |
Definition at line 373 of file G4VAnalysisManager.cc.
References fActivation.
00374 { 00375 if ( ! fActivation ) return true; 00376 00377 return ( fNofActiveObjects > 0 ); 00378 }
G4bool G4VAnalysisManager::IsAscii | ( | ) | const |
Definition at line 381 of file G4VAnalysisManager.cc.
Referenced by G4XmlAnalysisManager::Write(), G4RootAnalysisManager::Write(), and G4CsvAnalysisManager::Write().
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
G4bool G4VAnalysisManager::OpenFile | ( | ) | [virtual] |
Definition at line 266 of file G4VAnalysisManager.cc.
References fFileName, G4Exception(), and JustWarning.
00267 { 00268 if ( fFileName == "" ) { 00269 G4ExceptionDescription description; 00270 description 00271 << "Cannot open file. File name is not defined."; 00272 G4Exception("G4VAnalysisManager::OpenFile()", 00273 "Analysis_W009", JustWarning, description); 00274 return false; 00275 } 00276 00277 return OpenFile(fFileName); 00278 }
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
void G4VAnalysisManager::SetActivation | ( | ObjectType | type, | |
G4int | id, | |||
G4bool | activation | |||
) |
Definition at line 441 of file G4VAnalysisManager.cc.
References G4HnInformation::fActivation, and GetInformation().
00443 { 00444 // Set activation to a given object 00445 00446 G4HnInformation* info = GetInformation(type, id); 00447 00448 if ( ! info ) return; 00449 00450 // Do nothing if activation does not change 00451 if ( info->fActivation == activation ) return; 00452 00453 // Change activation and account it in fNofActiveObjects 00454 info->fActivation = activation; 00455 if ( activation ) 00456 fNofActiveObjects++; 00457 else 00458 fNofActiveObjects--; 00459 }
void G4VAnalysisManager::SetActivation | ( | ObjectType | type, | |
G4bool | activation | |||
) |
Definition at line 462 of file G4VAnalysisManager.cc.
References FatalException, G4Exception(), kH1, kH2, and kNtuple.
00463 { 00464 // Set activation to all objects of the given type 00465 00466 std::vector<G4HnInformation*>* informations; 00467 if ( type == kH1 ) 00468 informations = &fH1Informations; 00469 else if ( type == kH2 ) 00470 informations = &fH2Informations; 00471 else if ( type == kNtuple ) { 00472 return; 00473 } 00474 else { 00475 G4ExceptionDescription description; 00476 description << "Wrong object type."; 00477 G4Exception("G4VAnalysisManager::SetActivation()", 00478 "Analysis_W010", FatalException, description); 00479 return; 00480 } 00481 00482 std::vector<G4HnInformation*>::iterator it; 00483 for ( it = informations->begin(); it != informations->end(); it++ ) { 00484 G4HnInformation* info = *it; 00485 00486 // Do nothing if activation does not change 00487 if ( info->fActivation == activation ) continue; 00488 00489 // Change activation and account it in fNofActiveObjects 00490 info->fActivation = activation; 00491 if ( activation ) 00492 fNofActiveObjects++; 00493 else 00494 fNofActiveObjects--; 00495 } 00496 }
void G4VAnalysisManager::SetActivation | ( | G4bool | activation | ) | [inline] |
Definition at line 292 of file G4VAnalysisManager.hh.
References fActivation.
Referenced by G4XmlAnalysisManager::SetH1(), G4RootAnalysisManager::SetH1(), G4XmlAnalysisManager::SetH2(), G4RootAnalysisManager::SetH2(), and G4AnalysisMessenger::SetNewValue().
00292 { 00293 fActivation = activation; 00294 }
void G4VAnalysisManager::SetAscii | ( | ObjectType | type, | |
G4int | id, | |||
G4bool | ascii | |||
) |
Definition at line 499 of file G4VAnalysisManager.cc.
References G4HnInformation::fAscii, and GetInformation().
Referenced by G4AnalysisMessenger::SetNewValue().
00500 { 00501 G4HnInformation* info = GetInformation(type, id); 00502 00503 if ( ! info ) return; 00504 00505 // Do nothing if ascii does not change 00506 if ( info->fAscii == ascii ) return; 00507 00508 // Change ascii and account it in fNofAsciiObjects 00509 info->fAscii = ascii; 00510 if ( ascii ) 00511 fNofAsciiObjects++; 00512 else 00513 fNofAsciiObjects--; 00514 }
Definition at line 281 of file G4VAnalysisManager.cc.
References fFileName, fLockFileName, G4Exception(), and JustWarning.
Referenced by G4AnalysisMessenger::SetNewValue().
00282 { 00283 if ( fLockFileName ) { 00284 G4ExceptionDescription description; 00285 description 00286 << "Cannot set File name as its value was already used."; 00287 G4Exception("G4VAnalysisManager::SetFileName()", 00288 "Analysis_W009", JustWarning, description); 00289 return false; 00290 } 00291 00292 fFileName = fileName; 00293 return true; 00294 }
Definition at line 341 of file G4VAnalysisManager.cc.
References fFirstHistoId, fLockFirstHistoId, G4Exception(), and JustWarning.
00342 { 00343 if ( fLockFirstHistoId ) { 00344 G4ExceptionDescription description; 00345 description 00346 << "Cannot set FirstHistoId as its value was already used."; 00347 G4Exception("G4VAnalysisManager::SetFirstHistoId()", 00348 "Analysis_W009", JustWarning, description); 00349 return false; 00350 } 00351 00352 fFirstHistoId = firstId; 00353 return true; 00354 }
Definition at line 357 of file G4VAnalysisManager.cc.
References fFirstNtupleColumnId, fLockFirstNtupleColumnId, G4Exception(), and JustWarning.
00358 { 00359 if ( fLockFirstNtupleColumnId ) { 00360 G4ExceptionDescription description; 00361 description 00362 << "Cannot set FirstNtupleColumnId as its value was already used."; 00363 G4Exception("G4VAnalysisManager::SetFirstHistoId()", 00364 "Analysis_W010", JustWarning, description); 00365 return false; 00366 } 00367 00368 fFirstNtupleColumnId = firstId; 00369 return true; 00370 }
virtual G4bool G4VAnalysisManager::SetH1 | ( | G4int | id, | |
G4int | nbins, | |||
G4double | xmin, | |||
G4double | xmax, | |||
const G4String & | unitName = "none" , |
|||
const G4String & | fcnName = "none" | |||
) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Referenced by G4AnalysisMessenger::SetNewValue().
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Referenced by G4AnalysisMessenger::SetNewValue().
virtual G4bool G4VAnalysisManager::SetH1XAxisTitle | ( | G4int | id, | |
const G4String & | title | |||
) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Referenced by G4AnalysisMessenger::SetNewValue().
virtual G4bool G4VAnalysisManager::SetH1YAxisTitle | ( | G4int | id, | |
const G4String & | title | |||
) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Referenced by G4AnalysisMessenger::SetNewValue().
virtual G4bool G4VAnalysisManager::SetH2 | ( | G4int | id, | |
G4int | nxbins, | |||
G4double | xmin, | |||
G4double | xmax, | |||
G4int | nybins, | |||
G4double | ymin, | |||
G4double | ymax, | |||
const G4String & | xunitName = "none" , |
|||
const G4String & | yunitName = "none" , |
|||
const G4String & | xfcnName = "none" , |
|||
const G4String & | yfcnName = "none" | |||
) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Referenced by G4AnalysisMessenger::SetNewValue().
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Referenced by G4AnalysisMessenger::SetNewValue().
virtual G4bool G4VAnalysisManager::SetH2XAxisTitle | ( | G4int | id, | |
const G4String & | title | |||
) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Referenced by G4AnalysisMessenger::SetNewValue().
virtual G4bool G4VAnalysisManager::SetH2YAxisTitle | ( | G4int | id, | |
const G4String & | title | |||
) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Referenced by G4AnalysisMessenger::SetNewValue().
virtual G4bool G4VAnalysisManager::SetH2ZAxisTitle | ( | G4int | id, | |
const G4String & | title | |||
) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Referenced by G4AnalysisMessenger::SetNewValue().
Definition at line 297 of file G4VAnalysisManager.cc.
References fHistoDirectoryName, fLockHistoDirectoryName, G4Exception(), and JustWarning.
Referenced by G4AnalysisMessenger::SetNewValue().
00298 { 00299 if ( fLockHistoDirectoryName ) { 00300 G4ExceptionDescription description; 00301 description 00302 << "Cannot set Histo directory name as its value was already used."; 00303 G4Exception("G4VAnalysisManager::SetHistoDirectoryName()", 00304 "Analysis_W009", JustWarning, description); 00305 return false; 00306 } 00307 00308 fHistoDirectoryName = dirName; 00309 return true; 00310 }
Definition at line 313 of file G4VAnalysisManager.cc.
References fLockNtupleDirectoryName, fNtupleDirectoryName, G4Exception(), and JustWarning.
Referenced by G4AnalysisMessenger::SetNewValue().
00314 { 00315 if ( fLockNtupleDirectoryName ) { 00316 G4ExceptionDescription description; 00317 description 00318 << "Cannot set Ntuple directory name as its value was already used."; 00319 G4Exception("G4VAnalysisManager::SetNtupleDirectoryName()", 00320 "Analysis_W010", JustWarning, description); 00321 return false; 00322 } 00323 00324 fNtupleDirectoryName = dirName; 00325 return true; 00326 }
void G4VAnalysisManager::SetVerboseLevel | ( | G4int | verboseLevel | ) | [virtual] |
Definition at line 227 of file G4VAnalysisManager.cc.
References fpVerboseL1, fpVerboseL2, fpVerboseL3, fpVerboseL4, fVerboseL1, fVerboseL2, fVerboseL3, fVerboseL4, and fVerboseLevel.
Referenced by G4AnalysisMessenger::SetNewValue().
00228 { 00229 if ( verboseLevel == fVerboseLevel || verboseLevel < 0 ) return; 00230 00231 fVerboseLevel = verboseLevel; 00232 00233 if ( verboseLevel == 0 ) { 00234 fpVerboseL1 = 0; 00235 fpVerboseL2 = 0; 00236 fpVerboseL3 = 0; 00237 fpVerboseL4 = 0; 00238 } 00239 else if ( verboseLevel == 1 ) { 00240 fpVerboseL1 = &fVerboseL1; 00241 fpVerboseL2 = 0; 00242 fpVerboseL3 = 0; 00243 fpVerboseL4 = 0; 00244 } 00245 else if ( verboseLevel == 2 ) { 00246 fpVerboseL1 = &fVerboseL1; 00247 fpVerboseL2 = &fVerboseL2; 00248 fpVerboseL3 = 0; 00249 fpVerboseL4 = 0; 00250 } 00251 else if ( verboseLevel == 3 ) { 00252 fpVerboseL1 = &fVerboseL1; 00253 fpVerboseL2 = &fVerboseL2; 00254 fpVerboseL3 = &fVerboseL3; 00255 fpVerboseL4 = 0; 00256 } 00257 else { 00258 fpVerboseL1 = &fVerboseL1; 00259 fpVerboseL2 = &fVerboseL2; 00260 fpVerboseL3 = &fVerboseL3; 00261 fpVerboseL4 = &fVerboseL4; 00262 } 00263 }
virtual G4bool G4VAnalysisManager::Write | ( | ) | [pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
G4bool G4VAnalysisManager::WriteAscii | ( | ) | [protected] |
Definition at line 106 of file G4VAnalysisManager.cc.
References G4String::append(), fFileName, fpVerboseL1, fpVerboseL3, G4Exception(), JustWarning, G4AnalysisVerbose::Message(), and WriteOnAscii().
Referenced by G4XmlAnalysisManager::Write(), G4RootAnalysisManager::Write(), and G4CsvAnalysisManager::Write().
00107 { 00108 // Replace or add file extension .ascii 00109 G4String name(fFileName); 00110 if ( name.find(".") != std::string::npos ) { 00111 name.erase(name.find("."), name.length()); 00112 } 00113 name.append(".ascii"); 00114 00115 #ifdef G4VERBOSE 00116 if ( fpVerboseL3 ) 00117 fpVerboseL3->Message("write ASCII", "file", name); 00118 #endif 00119 00120 std::ofstream output(name, std::ios::out); 00121 if ( ! output ) { 00122 G4ExceptionDescription description; 00123 description 00124 << "Cannot open file. File name is not defined."; 00125 G4Exception("G4VAnalysisManager::WriteAscii()", 00126 "Analysis_W009", JustWarning, description); 00127 return false; 00128 } 00129 output.setf( std::ios::scientific, std::ios::floatfield ); 00130 00131 G4bool result = WriteOnAscii(output); 00132 00133 #ifdef G4VERBOSE 00134 if ( fpVerboseL1 ) 00135 fpVerboseL1->Message("write ASCII", "file", name, result); 00136 #endif 00137 00138 return result; 00139 }
virtual G4bool G4VAnalysisManager::WriteOnAscii | ( | std::ofstream & | output | ) | [protected, pure virtual] |
Implemented in G4CsvAnalysisManager, G4RootAnalysisManager, and G4XmlAnalysisManager.
Referenced by WriteAscii().
G4bool G4VAnalysisManager::fActivation [protected] |
Definition at line 238 of file G4VAnalysisManager.hh.
Referenced by G4XmlAnalysisManager::FillH1(), G4RootAnalysisManager::FillH1(), G4XmlAnalysisManager::FillH2(), G4RootAnalysisManager::FillH2(), GetActivation(), IsActive(), SetActivation(), G4XmlAnalysisManager::Write(), and G4RootAnalysisManager::Write().
G4String G4VAnalysisManager::fFileName [protected] |
Definition at line 241 of file G4VAnalysisManager.hh.
Referenced by GetFileName(), GetFullFileName(), OpenFile(), G4RootAnalysisManager::OpenFile(), G4CsvAnalysisManager::OpenFile(), SetFileName(), and WriteAscii().
G4int G4VAnalysisManager::fFirstHistoId [protected] |
Definition at line 239 of file G4VAnalysisManager.hh.
Referenced by GetH1Information(), GetH2Information(), SetFirstHistoId(), and G4RootAnalysisManager::WriteOnAscii().
G4int G4VAnalysisManager::fFirstNtupleColumnId [protected] |
Definition at line 240 of file G4VAnalysisManager.hh.
Referenced by G4XmlAnalysisManager::CreateNtupleDColumn(), G4RootAnalysisManager::CreateNtupleDColumn(), G4CsvAnalysisManager::CreateNtupleDColumn(), G4XmlAnalysisManager::CreateNtupleFColumn(), G4RootAnalysisManager::CreateNtupleFColumn(), G4CsvAnalysisManager::CreateNtupleFColumn(), G4XmlAnalysisManager::CreateNtupleIColumn(), G4RootAnalysisManager::CreateNtupleIColumn(), G4CsvAnalysisManager::CreateNtupleIColumn(), and SetFirstNtupleColumnId().
G4String G4VAnalysisManager::fHistoDirectoryName [protected] |
Definition at line 242 of file G4VAnalysisManager.hh.
Referenced by GetHistoDirectoryName(), SetHistoDirectoryName(), and G4XmlAnalysisManager::Write().
G4bool G4VAnalysisManager::fLockFileName [protected] |
Definition at line 246 of file G4VAnalysisManager.hh.
Referenced by G4XmlAnalysisManager::CloseFile(), G4RootAnalysisManager::CloseFile(), G4CsvAnalysisManager::CloseFile(), G4XmlAnalysisManager::OpenFile(), G4RootAnalysisManager::OpenFile(), G4CsvAnalysisManager::OpenFile(), and SetFileName().
G4bool G4VAnalysisManager::fLockFirstHistoId [protected] |
Definition at line 244 of file G4VAnalysisManager.hh.
Referenced by G4XmlAnalysisManager::CreateH1(), G4RootAnalysisManager::CreateH1(), G4XmlAnalysisManager::CreateH2(), G4RootAnalysisManager::CreateH2(), and SetFirstHistoId().
G4bool G4VAnalysisManager::fLockFirstNtupleColumnId [protected] |
Definition at line 245 of file G4VAnalysisManager.hh.
Referenced by G4XmlAnalysisManager::CreateNtupleDColumn(), G4RootAnalysisManager::CreateNtupleDColumn(), G4CsvAnalysisManager::CreateNtupleDColumn(), G4XmlAnalysisManager::CreateNtupleFColumn(), G4RootAnalysisManager::CreateNtupleFColumn(), G4CsvAnalysisManager::CreateNtupleFColumn(), G4XmlAnalysisManager::CreateNtupleIColumn(), G4RootAnalysisManager::CreateNtupleIColumn(), G4CsvAnalysisManager::CreateNtupleIColumn(), and SetFirstNtupleColumnId().
G4bool G4VAnalysisManager::fLockHistoDirectoryName [protected] |
Definition at line 247 of file G4VAnalysisManager.hh.
Referenced by G4RootAnalysisManager::OpenFile(), SetHistoDirectoryName(), and G4XmlAnalysisManager::Write().
G4bool G4VAnalysisManager::fLockNtupleDirectoryName [protected] |
Definition at line 248 of file G4VAnalysisManager.hh.
Referenced by G4XmlAnalysisManager::FinishNtuple(), G4RootAnalysisManager::OpenFile(), and SetNtupleDirectoryName().
G4String G4VAnalysisManager::fNtupleDirectoryName [protected] |
Definition at line 243 of file G4VAnalysisManager.hh.
Referenced by G4XmlAnalysisManager::FinishNtuple(), GetNtupleDirectoryName(), and SetNtupleDirectoryName().
G4AnalysisVerbose* G4VAnalysisManager::fpVerboseL1 [protected] |
Definition at line 255 of file G4VAnalysisManager.hh.
Referenced by G4XmlAnalysisManager::CloseFile(), G4RootAnalysisManager::CloseFile(), G4CsvAnalysisManager::CloseFile(), G4XmlAnalysisManager::OpenFile(), G4RootAnalysisManager::OpenFile(), G4CsvAnalysisManager::OpenFile(), SetVerboseLevel(), G4XmlAnalysisManager::Write(), G4RootAnalysisManager::Write(), and WriteAscii().
G4AnalysisVerbose* G4VAnalysisManager::fpVerboseL2 [protected] |
Definition at line 256 of file G4VAnalysisManager.hh.
Referenced by G4XmlAnalysisManager::CreateH1(), G4RootAnalysisManager::CreateH1(), G4XmlAnalysisManager::CreateH2(), G4RootAnalysisManager::CreateH2(), G4XmlAnalysisManager::CreateNtuple(), G4RootAnalysisManager::CreateNtuple(), G4CsvAnalysisManager::CreateNtuple(), G4XmlAnalysisManager::CreateNtupleDColumn(), G4RootAnalysisManager::CreateNtupleDColumn(), G4CsvAnalysisManager::CreateNtupleDColumn(), G4XmlAnalysisManager::CreateNtupleFColumn(), G4RootAnalysisManager::CreateNtupleFColumn(), G4CsvAnalysisManager::CreateNtupleFColumn(), G4XmlAnalysisManager::CreateNtupleIColumn(), G4RootAnalysisManager::CreateNtupleIColumn(), G4CsvAnalysisManager::CreateNtupleIColumn(), G4XmlAnalysisManager::FinishNtuple(), and SetVerboseLevel().
G4AnalysisVerbose* G4VAnalysisManager::fpVerboseL3 [protected] |
Definition at line 257 of file G4VAnalysisManager.hh.
Referenced by SetVerboseLevel(), G4XmlAnalysisManager::Write(), G4RootAnalysisManager::Write(), WriteAscii(), G4XmlAnalysisManager::WriteOnAscii(), and G4RootAnalysisManager::WriteOnAscii().
G4AnalysisVerbose* G4VAnalysisManager::fpVerboseL4 [protected] |
Definition at line 258 of file G4VAnalysisManager.hh.
Referenced by G4XmlAnalysisManager::AddNtupleRow(), G4RootAnalysisManager::AddNtupleRow(), G4CsvAnalysisManager::AddNtupleRow(), G4XmlAnalysisManager::CloseFile(), G4RootAnalysisManager::CloseFile(), G4CsvAnalysisManager::CloseFile(), G4XmlAnalysisManager::CreateH1(), G4RootAnalysisManager::CreateH1(), G4XmlAnalysisManager::CreateH2(), G4RootAnalysisManager::CreateH2(), G4XmlAnalysisManager::CreateNtuple(), G4RootAnalysisManager::CreateNtuple(), G4CsvAnalysisManager::CreateNtuple(), G4XmlAnalysisManager::CreateNtupleDColumn(), G4RootAnalysisManager::CreateNtupleDColumn(), G4CsvAnalysisManager::CreateNtupleDColumn(), G4XmlAnalysisManager::CreateNtupleFColumn(), G4RootAnalysisManager::CreateNtupleFColumn(), G4CsvAnalysisManager::CreateNtupleFColumn(), G4XmlAnalysisManager::CreateNtupleIColumn(), G4RootAnalysisManager::CreateNtupleIColumn(), G4CsvAnalysisManager::CreateNtupleIColumn(), G4XmlAnalysisManager::FillH1(), G4RootAnalysisManager::FillH1(), G4XmlAnalysisManager::FillH2(), G4RootAnalysisManager::FillH2(), G4XmlAnalysisManager::FillNtupleDColumn(), G4RootAnalysisManager::FillNtupleDColumn(), G4CsvAnalysisManager::FillNtupleDColumn(), G4XmlAnalysisManager::FillNtupleFColumn(), G4RootAnalysisManager::FillNtupleFColumn(), G4CsvAnalysisManager::FillNtupleFColumn(), G4XmlAnalysisManager::FillNtupleIColumn(), G4RootAnalysisManager::FillNtupleIColumn(), G4CsvAnalysisManager::FillNtupleIColumn(), G4XmlAnalysisManager::FinishNtuple(), G4XmlAnalysisManager::OpenFile(), G4RootAnalysisManager::OpenFile(), G4CsvAnalysisManager::OpenFile(), G4XmlAnalysisManager::SetH1(), G4RootAnalysisManager::SetH1(), G4XmlAnalysisManager::SetH2(), G4RootAnalysisManager::SetH2(), SetVerboseLevel(), and G4RootAnalysisManager::Write().
G4AnalysisVerbose G4VAnalysisManager::fVerboseL1 [protected] |
Definition at line 251 of file G4VAnalysisManager.hh.
Referenced by GetFileType(), GetType(), and SetVerboseLevel().
G4AnalysisVerbose G4VAnalysisManager::fVerboseL2 [protected] |
G4AnalysisVerbose G4VAnalysisManager::fVerboseL3 [protected] |
G4AnalysisVerbose G4VAnalysisManager::fVerboseL4 [protected] |
G4int G4VAnalysisManager::fVerboseLevel [protected] |
Definition at line 237 of file G4VAnalysisManager.hh.
Referenced by GetVerboseLevel(), and SetVerboseLevel().