#include <G4HnManager.hh>
|
| G4HnManager (G4String hnType, const G4AnalysisManagerState &state) |
|
| G4HnManager ()=delete |
|
| ~G4HnManager () override |
|
void | CreateMessenger () |
|
void | AddHnInformation (G4HnInformation *info) |
|
void | AddHnInformation (G4HnInformation *info, G4int index) |
|
void | SetHnDeleted (G4HnInformation *info, G4bool keepSetting) |
|
void | ClearData () |
|
G4HnInformation * | GetHnInformation (G4int id, std::string_view functionName, G4bool warn=true) const |
|
G4HnDimensionInformation * | GetHnDimensionInformation (G4int id, G4int dimension, std::string_view functionName, G4bool warn=true) const |
|
const std::vector< G4HnInformation * > & | GetHnVector () const |
|
G4int | GetNofActiveHns () const |
|
G4String | GetHnType () const |
|
G4bool | IsActive () const |
|
G4bool | IsAscii () const |
|
G4bool | IsPlotting () const |
|
G4bool | IsFileName () const |
|
void | SetActivation (G4bool activation) |
|
void | SetActivation (G4int id, G4bool activation) |
|
void | SetAscii (G4int id, G4bool ascii) |
|
void | SetPlotting (G4int id, G4bool plotting) |
|
void | SetPlotting (G4bool plotting) |
|
void | SetFileName (G4int id, const G4String &fileName) |
|
void | SetFileName (const G4String &fileName) |
|
G4bool | SetAxisIsLog (unsigned int idim, G4int id, G4bool isLogAxis) |
|
G4String | GetName (G4int id) const |
|
G4double | GetUnit (unsigned int idim, G4int id) const |
|
G4bool | GetAxisIsLog (unsigned int idim, G4int id) const |
|
G4bool | GetActivation (G4int id) const |
|
G4bool | GetAscii (G4int id) const |
|
G4bool | GetPlotting (G4int id) const |
|
G4String | GetFileName (G4int id) const |
|
void | SetFileManager (std::shared_ptr< G4VFileManager > fileManager) |
|
void | SetDefaultFileType (const G4String &fileType) |
|
| G4BaseAnalysisManager (const G4AnalysisManagerState &state) |
|
| G4BaseAnalysisManager ()=delete |
|
virtual | ~G4BaseAnalysisManager ()=default |
|
G4bool | SetFirstId (G4int firstId) |
|
void | SetLockFirstId (G4bool lockFirstId) |
|
G4int | GetFirstId () const |
|
G4int | GetCycle () const |
|
Definition at line 48 of file G4HnManager.hh.
◆ G4HnManager() [1/2]
Definition at line 41 of file G4HnManager.cc.
43{}
G4BaseAnalysisManager()=delete
◆ G4HnManager() [2/2]
G4HnManager::G4HnManager |
( |
| ) |
|
|
delete |
◆ ~G4HnManager()
G4HnManager::~G4HnManager |
( |
| ) |
|
|
override |
Definition at line 46 of file G4HnManager.cc.
47{
48 for ( auto info : fHnVector ) {
49 delete info;
50 }
51}
◆ AddHnInformation() [1/2]
Definition at line 144 of file G4HnManager.cc.
145{
146
147
148 fHnVector.push_back(info);
149 ++fNofActiveObjects;
150}
◆ AddHnInformation() [2/2]
Definition at line 153 of file G4HnManager.cc.
154{
155
156
157
158
159 auto previousInfo = fHnVector[index];
160 if (previousInfo->GetDeletedPair().second) {
161 info->
Update(*previousInfo);
162 }
163 delete previousInfo;
164
165 fHnVector[index] = info;
166
168 if (info->
GetAscii()) { ++fNofAsciiObjects; }
169 if (info->
GetPlotting()) { ++fNofPlottingObjects; }
170 if (! info->
GetFileName().empty()) { ++fNofFileNameObjects; }
171}
◆ ClearData()
void G4HnManager::ClearData |
( |
| ) |
|
Definition at line 185 of file G4HnManager.cc.
186{
187 for ( auto info : fHnVector ) {
188 delete info;
189 }
190 fHnVector.clear();
192}
void SetLockFirstId(G4bool lockFirstId)
◆ CreateMessenger()
void G4HnManager::CreateMessenger |
( |
| ) |
|
Definition at line 138 of file G4HnManager.cc.
139{
140 fMessenger = std::make_unique<G4HnMessenger>(*this);
141}
◆ GetActivation()
Definition at line 372 of file G4HnManager.cc.
373{
375
376 if (info == nullptr) return true;
377
378 return info->GetActivation();
379}
G4HnInformation * GetHnInformation(G4int id, std::string_view functionName, G4bool warn=true) const
◆ GetAscii()
Definition at line 382 of file G4HnManager.cc.
383{
385
386 if (info == nullptr) return false;
387
388 return info->GetAscii();
389}
◆ GetAxisIsLog()
G4bool G4HnManager::GetAxisIsLog |
( |
unsigned int | idim, |
|
|
G4int | id ) const |
Definition at line 362 of file G4HnManager.cc.
363{
365
366 if (info == nullptr) return false;
367
368 return info->GetIsLogAxis(idim);
369}
◆ GetFileName()
Definition at line 402 of file G4HnManager.cc.
403{
405
406 if (info == nullptr) return "";
407
408 return info->GetFileName();
409}
◆ GetHnDimensionInformation()
Definition at line 210 of file G4HnManager.cc.
213{
215 if (info == nullptr) return nullptr;
216
217 return info->GetHnDimensionInformation(dimension);
218}
Referenced by GetUnit().
◆ GetHnInformation()
Definition at line 195 of file G4HnManager.cc.
197{
199 if ( index < 0 || index >=
G4int(fHnVector.size()) ) {
200 if ( warn ) {
201 Warn(fHnType +
" histogram " + to_string(
id) +
" does not exist.",
202 fkClass, functionName);
203 }
204 return nullptr;
205 }
206 return fHnVector[index];
207}
void Warn(const G4String &message, const std::string_view inClass, const std::string_view inFunction)
Referenced by GetActivation(), GetAscii(), GetAxisIsLog(), GetFileName(), GetHnDimensionInformation(), GetName(), GetPlotting(), SetActivation(), SetAscii(), SetAxisIsLog(), SetFileName(), and SetPlotting().
◆ GetHnType()
G4String G4HnManager::GetHnType |
( |
| ) |
const |
|
inline |
◆ GetHnVector()
const std::vector< G4HnInformation * > & G4HnManager::GetHnVector |
( |
| ) |
const |
|
inline |
◆ GetName()
Definition at line 342 of file G4HnManager.cc.
343{
345
346 if (info == nullptr) return "";
347
348 return info->GetName();
349}
◆ GetNofActiveHns()
G4int G4HnManager::GetNofActiveHns |
( |
| ) |
const |
|
inline |
◆ GetPlotting()
Definition at line 392 of file G4HnManager.cc.
393{
395
396 if (info == nullptr) return false;
397
398 return info->GetPlotting();
399}
◆ GetUnit()
G4double G4HnManager::GetUnit |
( |
unsigned int | idim, |
|
|
G4int | id ) const |
Definition at line 352 of file G4HnManager.cc.
353{
355
356 if (info == nullptr) return 1.0;
357
358 return info->fUnit;
359}
G4HnDimensionInformation * GetHnDimensionInformation(G4int id, G4int dimension, std::string_view functionName, G4bool warn=true) const
◆ IsActive()
G4bool G4HnManager::IsActive |
( |
| ) |
const |
Definition at line 221 of file G4HnManager.cc.
222{
223 return ( fNofActiveObjects > 0 );
224}
◆ IsAscii()
G4bool G4HnManager::IsAscii |
( |
| ) |
const |
Definition at line 227 of file G4HnManager.cc.
228{
229 return ( fNofAsciiObjects > 0 );
230}
◆ IsFileName()
G4bool G4HnManager::IsFileName |
( |
| ) |
const |
Definition at line 239 of file G4HnManager.cc.
240{
241 return ( fNofFileNameObjects > 0 );
242}
◆ IsPlotting()
G4bool G4HnManager::IsPlotting |
( |
| ) |
const |
Definition at line 233 of file G4HnManager.cc.
234{
235 return ( fNofPlottingObjects > 0 );
236}
◆ SetActivation() [1/2]
void G4HnManager::SetActivation |
( |
G4bool | activation | ) |
|
◆ SetActivation() [2/2]
void G4HnManager::SetActivation |
( |
G4int | id, |
|
|
G4bool | activation ) |
Definition at line 245 of file G4HnManager.cc.
246{
247
248
250
251 if (info == nullptr) return;
252
254}
◆ SetAscii()
Definition at line 271 of file G4HnManager.cc.
272{
274
275 if (info == nullptr) return;
276
277
278 if ( info->GetAscii() == ascii ) return;
279
280
281 info->SetAscii(ascii);
282 if (ascii) {
283 fNofAsciiObjects++;
284 }
285 else {
286 fNofAsciiObjects--;
287 }
288}
Referenced by G4HnMessenger::SetNewValue().
◆ SetAxisIsLog()
◆ SetDefaultFileType()
void G4HnManager::SetDefaultFileType |
( |
const G4String & | fileType | ) |
|
|
inline |
Definition at line 163 of file G4HnManager.hh.
164{
165 fDefaultFileType = fileType;
166}
◆ SetFileManager()
void G4HnManager::SetFileManager |
( |
std::shared_ptr< G4VFileManager > | fileManager | ) |
|
|
inline |
Definition at line 158 of file G4HnManager.hh.
159{
160 fFileManager = std::move(fileManager);
161}
◆ SetFileName() [1/2]
void G4HnManager::SetFileName |
( |
const G4String & | fileName | ) |
|
Definition at line 321 of file G4HnManager.cc.
322{
323
324
325 for ( auto info : fHnVector ) {
327 }
328}
void SetFileName(G4int id, const G4String &fileName)
◆ SetFileName() [2/2]
void G4HnManager::SetFileName |
( |
G4int | id, |
|
|
const G4String & | fileName ) |
◆ SetHnDeleted()
◆ SetPlotting() [1/2]
void G4HnManager::SetPlotting |
( |
G4bool | plotting | ) |
|
Definition at line 301 of file G4HnManager.cc.
302{
303
304
305 for ( auto info : fHnVector ) {
307 }
308}
void SetPlotting(G4int id, G4bool plotting)
◆ SetPlotting() [2/2]
void G4HnManager::SetPlotting |
( |
G4int | id, |
|
|
G4bool | plotting ) |
The documentation for this class was generated from the following files: