Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VAnalysisManager.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26
27// Author: Ivana Hrivnacova, 09/07/2013 ([email protected])
28
29#include "G4VAnalysisManager.hh"
32#include "G4HnManager.hh"
33#include "G4VH1Manager.hh"
34#include "G4VH2Manager.hh"
35#include "G4VH3Manager.hh"
36#include "G4VP1Manager.hh"
37#include "G4VP2Manager.hh"
38#include "G4VNtupleManager.hh"
39#include "G4VFileManager.hh"
41
42#include <iostream>
43
44using namespace G4Analysis;
45
46namespace {
47
48//_____________________________________________________________________________
49void NtupleMergingWarning(const G4String& functionName,
50 const G4String& outputType)
51{
52 G4ExceptionDescription description;
53 description
54 << " " << "Ntuple merging is not available with "
55 << outputType << " output." << G4endl
56 << " " << "Setting is ignored.";
57 G4Exception(functionName, "Analysis_W041", JustWarning, description);
58}
59
60}
61
62//_____________________________________________________________________________
64 : fState(type, isMaster),
65 fVFileManager(nullptr),
66 fPlotManager(nullptr),
67 fNtupleBookingManager(nullptr),
68 fVNtupleManager(nullptr),
69 fMessenger(G4Analysis::make_unique<G4AnalysisMessenger>(this)),
70 fH1HnManager(nullptr),
71 fH2HnManager(nullptr),
72 fH3HnManager(nullptr),
73 fP1HnManager(nullptr),
74 fP2HnManager(nullptr),
75 fVH1Manager(nullptr),
76 fVH2Manager(nullptr),
77 fVH3Manager(nullptr),
78 fVP1Manager(nullptr),
79 fVP2Manager(nullptr)
80{
81 fNtupleBookingManager = std::make_shared<G4NtupleBookingManager>(fState);
82}
83
84//_____________________________________________________________________________
86{
87 // delete fVNtupleManager;
88}
89
90//
91// protected methods
92//
93
94//_____________________________________________________________________________
96{
97 fVH1Manager.reset(h1Manager);
98 fH1HnManager = h1Manager->GetHnManager();
99 fMessenger->SetH1HnManager(*fH1HnManager);
100 if (fVFileManager != nullptr ) fH1HnManager->SetFileManager(fVFileManager);
101}
102
103//_____________________________________________________________________________
105{
106 fVH2Manager.reset(h2Manager);
107 fH2HnManager = h2Manager->GetHnManager();
108 fMessenger->SetH2HnManager(*fH2HnManager);
109 if (fVFileManager != nullptr ) fH2HnManager->SetFileManager(fVFileManager);
110}
111
112//_____________________________________________________________________________
114{
115 fVH3Manager.reset(h3Manager);
116 fH3HnManager = h3Manager->GetHnManager();
117 fMessenger->SetH3HnManager(*fH3HnManager);
118 if (fVFileManager != nullptr ) fH3HnManager->SetFileManager(fVFileManager);
119}
120
121//_____________________________________________________________________________
123{
124 fVP1Manager.reset(p1Manager);
125 fP1HnManager = p1Manager->GetHnManager();
126 fMessenger->SetP1HnManager(*fP1HnManager);
127 if (fVFileManager != nullptr ) fP1HnManager->SetFileManager(fVFileManager);
128}
129
130//_____________________________________________________________________________
132{
133 fVP2Manager.reset(p2Manager);
134 fP2HnManager = p2Manager->GetHnManager();
135 fMessenger->SetP2HnManager(*fP2HnManager);
136 if (fVFileManager != nullptr ) fP2HnManager->SetFileManager(fVFileManager);
137}
138
139//_____________________________________________________________________________
140void G4VAnalysisManager::SetNtupleManager(std::shared_ptr<G4VNtupleManager> ntupleManager)
141{
142 fVNtupleManager = ntupleManager;
143 fVNtupleManager->SetFirstId(fNtupleBookingManager->GetFirstId());
144 fVNtupleManager->SetFirstNtupleColumnId(fNtupleBookingManager->GetFirstNtupleColumnId());
145}
146
147//_____________________________________________________________________________
148void G4VAnalysisManager::SetFileManager(std::shared_ptr<G4VFileManager> fileManager)
149{
150 fVFileManager = fileManager;
151
152 if ( fH1HnManager != nullptr ) fH1HnManager->SetFileManager(fileManager);
153 if ( fH2HnManager != nullptr ) fH2HnManager->SetFileManager(fileManager);
154 if ( fH3HnManager != nullptr ) fH3HnManager->SetFileManager(fileManager);
155 if ( fP1HnManager != nullptr ) fP1HnManager->SetFileManager(fileManager);
156 if ( fP2HnManager != nullptr ) fP2HnManager->SetFileManager(fileManager);
157}
158
159//_____________________________________________________________________________
160void G4VAnalysisManager::SetPlotManager(std::shared_ptr<G4PlotManager> plotManager)
161{
162 fPlotManager = plotManager;
163}
164
165//_____________________________________________________________________________
167{
168 G4bool finalResult = true;
169
170 // Replace or add file extension .ascii
171 G4String name(fileName);
172 if ( name.find(".") != std::string::npos ) {
173 name.erase(name.find("."), name.length());
174 }
175 name.append(".ascii");
176
177#ifdef G4VERBOSE
178 if ( fState.GetVerboseL3() )
179 fState.GetVerboseL3()->Message("write ASCII", "file", name);
180#endif
181
182 std::ofstream output(name, std::ios::out);
183 if ( ! output ) {
184 G4ExceptionDescription description;
185 description
186 << "Cannot open file. File name is not defined.";
187 G4Exception("G4VAnalysisManager::WriteAscii()",
188 "Analysis_W001", JustWarning, description);
189 return false;
190 }
191 output.setf( std::ios::scientific, std::ios::floatfield );
192
193 G4bool result = fVH1Manager->WriteOnAscii(output);
194 finalResult = finalResult && result;
195
196 result = fVH2Manager->WriteOnAscii(output);
197 finalResult = finalResult && result;
198
199 result = fVH3Manager->WriteOnAscii(output);
200 finalResult = finalResult && result;
201
202 //result = fVP1Manager->WriteOnAscii(output);
203 //finalResult = finalResult && result;
204
205 //result = fVP2Manager->WriteOnAscii(output);
206 //finalResult = finalResult && result;
207
208#ifdef G4VERBOSE
209 if ( fState.GetVerboseL1() )
210 fState.GetVerboseL1()->Message("write ASCII", "file", name, result);
211#endif
212
213 return finalResult;
214}
215
216//
217// public methods
218//
219
220//_____________________________________________________________________________
222{
223 if ( fileName != "" ) {
224 return OpenFileImpl(fileName);
225 }
226 else {
227 if ( fVFileManager->GetFileName() == "" ) {
228 G4ExceptionDescription description;
229 description
230 << "Cannot open file. File name is not defined.";
231 G4Exception("G4VFileManager::OpenFile()",
232 "Analysis_W001", JustWarning, description);
233 return false;
234 }
235 return OpenFileImpl(fVFileManager->GetFileName());
236 }
237}
238
239//_____________________________________________________________________________
241{
242 G4bool finalResult = true;
243
244 G4bool result = WriteImpl();
245 finalResult = finalResult && result;
246
247 if ( IsPlotting() ) {
248 result = PlotImpl();
249 finalResult = finalResult && result;
250 }
251
252 return finalResult;
253}
254
255//_____________________________________________________________________________
257{
258 return CloseFileImpl(reset);
259}
260
261//_____________________________________________________________________________
262G4bool G4VAnalysisManager::Merge(tools::histo::hmpi* hmpi)
263{
264 return MergeImpl(hmpi);
265}
266
267//_____________________________________________________________________________
269{
270 return PlotImpl();
271}
272
273//_____________________________________________________________________________
275{
276 return IsOpenFileImpl();
277}
278
279//_____________________________________________________________________________
281{
282 return fVFileManager->SetFileName(fileName);
283}
284
285//_____________________________________________________________________________
287{
288 return fVFileManager->SetHistoDirectoryName(dirName);
289}
290
291//_____________________________________________________________________________
293{
294 return fVFileManager->SetNtupleDirectoryName(dirName);
295}
296
297//_____________________________________________________________________________
299{
300 fState.SetCompressionLevel(level);
301}
302
303//_____________________________________________________________________________
305{
306 return fVFileManager->GetFileName();
307}
308
309//_____________________________________________________________________________
311{
312 return fVFileManager->GetHistoDirectoryName();
313}
314
315//_____________________________________________________________________________
317{
318 return fVFileManager->GetNtupleDirectoryName();
319}
320
321//_____________________________________________________________________________
323{
325}
326
327//_____________________________________________________________________________
329 G4int nbins, G4double xmin, G4double xmax,
330 const G4String& unitName, const G4String& fcnName,
331 const G4String& binSchemeName)
332{
333 if ( ! CheckName(name, "H1") ) return kInvalidId;
334 if ( ! CheckNbins(nbins) ) return kInvalidId;
335 if ( ! CheckMinMax(xmin, xmax, fcnName, binSchemeName) ) return kInvalidId;
336
337 return fVH1Manager->CreateH1(name, title, nbins, xmin, xmax,
338 unitName, fcnName, binSchemeName);
339}
340
341//_____________________________________________________________________________
343 const std::vector<G4double>& edges,
344 const G4String& unitName, const G4String& fcnName)
345{
346 if ( ! CheckName(name, "H1") ) return kInvalidId;
347 if ( ! CheckEdges(edges) ) return kInvalidId;
348
349 return fVH1Manager->CreateH1(name, title, edges, unitName, fcnName);
350}
351
352//_____________________________________________________________________________
354 G4int nxbins, G4double xmin, G4double xmax,
355 G4int nybins, G4double ymin, G4double ymax,
356 const G4String& xunitName, const G4String& yunitName,
357 const G4String& xfcnName, const G4String& yfcnName,
358 const G4String& xbinSchemeName,
359 const G4String& ybinSchemeName)
360
361{
362 if ( ! CheckName(name, "H2") ) return kInvalidId;
363
364 if ( ! CheckNbins(nxbins) ) return kInvalidId;
365 if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
366
367 if ( ! CheckNbins(nybins) ) return kInvalidId;
368 if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
369
370 return fVH2Manager->CreateH2(name, title,
371 nxbins, xmin, xmax, nybins, ymin, ymax,
372 xunitName, yunitName, xfcnName, yfcnName,
373 xbinSchemeName, ybinSchemeName);
374}
375
376//_____________________________________________________________________________
378 const std::vector<G4double>& xedges,
379 const std::vector<G4double>& yedges,
380 const G4String& xunitName, const G4String& yunitName,
381 const G4String& xfcnName, const G4String& yfcnName)
382
383{
384 if ( ! CheckName(name, "H2") ) return kInvalidId;
385
386 if ( ! CheckEdges(xedges) ) return kInvalidId;
387 if ( ! CheckEdges(yedges) ) return kInvalidId;
388
389 return fVH2Manager->CreateH2(name, title,
390 xedges, yedges,
391 xunitName, yunitName, xfcnName, yfcnName);
392}
393
394//_____________________________________________________________________________
396 G4int nxbins, G4double xmin, G4double xmax,
397 G4int nybins, G4double ymin, G4double ymax,
398 G4int nzbins, G4double zmin, G4double zmax,
399 const G4String& xunitName, const G4String& yunitName,
400 const G4String& zunitName,
401 const G4String& xfcnName, const G4String& yfcnName,
402 const G4String& zfcnName,
403 const G4String& xbinSchemeName,
404 const G4String& ybinSchemeName,
405 const G4String& zbinSchemeName)
406
407{
408 if ( ! CheckName(name, "H3") ) return kInvalidId;
409
410 if ( ! CheckNbins(nxbins) ) return kInvalidId;
411 if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
412
413 if ( ! CheckNbins(nybins) ) return kInvalidId;
414 if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
415
416 if ( ! CheckNbins(nzbins) ) return kInvalidId;
417 if ( ! CheckMinMax(zmin, zmax, zfcnName, zbinSchemeName) ) return kInvalidId;
418
419 return fVH3Manager->CreateH3(name, title,
420 nxbins, xmin, xmax, nybins, ymin, ymax,
421 nzbins, zmin, zmax,
422 xunitName, yunitName, zunitName,
423 xfcnName, yfcnName, zfcnName,
424 xbinSchemeName, ybinSchemeName, zbinSchemeName);
425}
426
427//_____________________________________________________________________________
429 const std::vector<G4double>& xedges,
430 const std::vector<G4double>& yedges,
431 const std::vector<G4double>& zedges,
432 const G4String& xunitName, const G4String& yunitName,
433 const G4String& zunitName,
434 const G4String& xfcnName, const G4String& yfcnName,
435 const G4String& zfcnName)
436
437{
438 if ( ! CheckName(name, "H3") ) return kInvalidId;
439
440 if ( ! CheckEdges(xedges) ) return kInvalidId;
441 if ( ! CheckEdges(yedges) ) return kInvalidId;
442 if ( ! CheckEdges(zedges) ) return kInvalidId;
443
444 return fVH3Manager->CreateH3(name, title,
445 xedges, yedges, zedges,
446 xunitName, yunitName, zunitName,
447 xfcnName, yfcnName, zfcnName);
448}
449
450//_____________________________________________________________________________
452 G4int nbins, G4double xmin, G4double xmax,
453 const G4String& unitName, const G4String& fcnName,
454 const G4String& binSchemeName)
455{
456 if ( ! CheckNbins(nbins) ) return kInvalidId;
457 if ( ! CheckMinMax(xmin, xmax, fcnName, binSchemeName) ) return kInvalidId;
458
459 return fVH1Manager->SetH1(id, nbins, xmin, xmax, unitName, fcnName, binSchemeName);
460}
461
462//_____________________________________________________________________________
464 const std::vector<G4double>& edges,
465 const G4String& unitName, const G4String& fcnName)
466{
467 if ( ! CheckEdges(edges) ) return kInvalidId;
468
469 return fVH1Manager->SetH1(id, edges, unitName, fcnName);
470}
471
472//_____________________________________________________________________________
474 G4int nxbins, G4double xmin, G4double xmax,
475 G4int nybins, G4double ymin, G4double ymax,
476 const G4String& xunitName, const G4String& yunitName,
477 const G4String& xfcnName, const G4String& yfcnName,
478 const G4String& xbinSchemeName,
479 const G4String& ybinSchemeName)
480{
481 if ( ! CheckNbins(nxbins) ) return kInvalidId;
482 if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
483
484 if ( ! CheckNbins(nybins) ) return kInvalidId;
485 if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
486
487 return fVH2Manager->SetH2(id, nxbins, xmin, xmax, nybins, ymin, ymax,
488 xunitName, yunitName, xfcnName, yfcnName,
489 xbinSchemeName, ybinSchemeName);
490}
491
492//_____________________________________________________________________________
494 const std::vector<G4double>& xedges,
495 const std::vector<G4double>& yedges,
496 const G4String& xunitName, const G4String& yunitName,
497 const G4String& xfcnName, const G4String& yfcnName)
498{
499 if ( ! CheckEdges(xedges) ) return kInvalidId;
500 if ( ! CheckEdges(yedges) ) return kInvalidId;
501
502 return fVH2Manager->SetH2(id, xedges, yedges,
503 xunitName, yunitName, xfcnName, yfcnName);
504}
505
506//_____________________________________________________________________________
508 G4int nxbins, G4double xmin, G4double xmax,
509 G4int nybins, G4double ymin, G4double ymax,
510 G4int nzbins, G4double zmin, G4double zmax,
511 const G4String& xunitName, const G4String& yunitName,
512 const G4String& zunitName,
513 const G4String& xfcnName, const G4String& yfcnName,
514 const G4String& zfcnName,
515 const G4String& xbinSchemeName,
516 const G4String& ybinSchemeName,
517 const G4String& zbinSchemeName)
518{
519 if ( ! CheckNbins(nxbins) ) return kInvalidId;
520 if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
521
522 if ( ! CheckNbins(nybins) ) return kInvalidId;
523 if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
524
525 if ( ! CheckNbins(nzbins) ) return kInvalidId;
526 if ( ! CheckMinMax(zmin, zmax, zfcnName, zbinSchemeName) ) return kInvalidId;
527
528 return fVH3Manager->SetH3(id,
529 nxbins, xmin, xmax, nybins, ymin, ymax,
530 nzbins, zmin, zmax,
531 xunitName, yunitName, zunitName,
532 xfcnName, yfcnName, zfcnName,
533 xbinSchemeName, ybinSchemeName, zbinSchemeName);
534}
535
536//_____________________________________________________________________________
538 const std::vector<G4double>& xedges,
539 const std::vector<G4double>& yedges,
540 const std::vector<G4double>& zedges,
541 const G4String& xunitName, const G4String& yunitName,
542 const G4String& zunitName,
543 const G4String& xfcnName, const G4String& yfcnName,
544 const G4String& zfcnName)
545{
546 if ( ! CheckEdges(xedges) ) return kInvalidId;
547 if ( ! CheckEdges(yedges) ) return kInvalidId;
548 if ( ! CheckEdges(zedges) ) return kInvalidId;
549
550 return fVH3Manager->SetH3(id, xedges, yedges, zedges,
551 xunitName, yunitName, zunitName,
552 xfcnName, yfcnName, zfcnName);
553}
554
555//_____________________________________________________________________________
557{
558 return fVH1Manager->ScaleH1(id, factor);
559}
560
561//_____________________________________________________________________________
563{
564 return fVH2Manager->ScaleH2(id, factor);
565}
566
567//_____________________________________________________________________________
569{
570 return fVH3Manager->ScaleH3(id, factor);
571}
572
573//_____________________________________________________________________________
575 G4int nbins, G4double xmin, G4double xmax,
576 G4double ymin, G4double ymax,
577 const G4String& xunitName, const G4String& yunitName,
578 const G4String& xfcnName, const G4String& yfcnName,
579 const G4String& xbinSchemeName)
580{
581 if ( ! CheckName(name, "P1") ) return kInvalidId;
582 if ( ! CheckNbins(nbins) ) return kInvalidId;
583 if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
584 if ( ymin != 0. || ymax != 0. ) {
585 // Do not check default values
586 if ( ! CheckMinMax(ymin, ymax) ) return kInvalidId;
587 }
588
589 return fVP1Manager->CreateP1(name, title, nbins, xmin, xmax, ymin, ymax,
590 xunitName, yunitName, xfcnName, yfcnName,
591 xbinSchemeName);
592}
593
594//_____________________________________________________________________________
596 const std::vector<G4double>& edges,
597 G4double ymin, G4double ymax,
598 const G4String& xunitName, const G4String& yunitName,
599 const G4String& xfcnName, const G4String& yfcnName)
600{
601 if ( ! CheckName(name, "P1") ) return kInvalidId;
602 if ( ! CheckEdges(edges) ) return kInvalidId;
603 if ( ymin != 0. || ymax != 0. ) {
604 // Do not check default values
605 if ( ! CheckMinMax(ymin, ymax) ) return kInvalidId;
606 }
607
608 return fVP1Manager->CreateP1(name, title, edges, ymin, ymax,
609 xunitName, yunitName, xfcnName, yfcnName);
610}
611
612//_____________________________________________________________________________
614 G4int nxbins, G4double xmin, G4double xmax,
615 G4int nybins, G4double ymin, G4double ymax,
616 G4double zmin, G4double zmax,
617 const G4String& xunitName, const G4String& yunitName,
618 const G4String& zunitName,
619 const G4String& xfcnName, const G4String& yfcnName,
620 const G4String& zfcnName,
621 const G4String& xbinSchemeName,
622 const G4String& ybinSchemeName)
623{
624 if ( ! CheckName(name, "P2") ) return kInvalidId;
625 if ( ! CheckNbins(nxbins) ) return kInvalidId;
626 if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
627 if ( ! CheckMinMax(ymin, ymax, yfcnName, xbinSchemeName) ) return kInvalidId;
628 if ( zmin != 0. || zmax != 0. ) {
629 // Do not check default values
630 if ( ! CheckMinMax(zmin, zmax) ) return kInvalidId;
631 }
632
633 return fVP2Manager->CreateP2(name, title,
634 nxbins, xmin, xmax, nybins, ymin, ymax,
635 zmin, zmax,
636 xunitName, yunitName, zunitName,
637 xfcnName, yfcnName, zfcnName,
638 xbinSchemeName, ybinSchemeName);
639}
640
641//_____________________________________________________________________________
643 const std::vector<G4double>& xedges,
644 const std::vector<G4double>& yedges,
645 G4double zmin, G4double zmax,
646 const G4String& xunitName, const G4String& yunitName,
647 const G4String& zunitName,
648 const G4String& xfcnName, const G4String& yfcnName,
649 const G4String& zfcnName)
650{
651 if ( ! CheckName(name, "P2") ) return kInvalidId;
652 if ( ! CheckEdges(xedges) ) return kInvalidId;
653 if ( ! CheckEdges(yedges) ) return kInvalidId;
654 if ( zmin != 0. || zmax != 0. ) {
655 // Do not check default values
656 if ( ! CheckMinMax(zmin, zmax) ) return kInvalidId;
657 }
658
659 return fVP2Manager->CreateP2(name, title, xedges, yedges, zmin, zmax,
660 xunitName, yunitName, zunitName,
661 xfcnName, yfcnName, zfcnName);
662}
663
664//_____________________________________________________________________________
666 G4int nbins, G4double xmin, G4double xmax,
667 G4double ymin, G4double ymax,
668 const G4String& xunitName, const G4String& yunitName,
669 const G4String& xfcnName, const G4String& yfcnName,
670 const G4String& xbinSchemeName)
671{
672 if ( ! CheckNbins(nbins) ) return kInvalidId;
673 if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
674 if ( ymin != 0. || ymax != 0. ) {
675 // Do not check default values
676 if ( ! CheckMinMax(ymin, ymax) ) return kInvalidId;
677 }
678
679 return fVP1Manager->SetP1(id, nbins, xmin, xmax, ymin, ymax,
680 xunitName, yunitName, xfcnName, yfcnName,
681 xbinSchemeName);
682}
683
684//_____________________________________________________________________________
686 const std::vector<G4double>& edges,
687 G4double ymin, G4double ymax,
688 const G4String& xunitName, const G4String& yunitName,
689 const G4String& xfcnName, const G4String& yfcnName)
690{
691 if ( ! CheckEdges(edges) ) return kInvalidId;
692 if ( ymin != 0. || ymax != 0. ) {
693 // Do not check default values
694 if ( ! CheckMinMax(ymin, ymax) ) return kInvalidId;
695 }
696
697 return fVP1Manager->SetP1(id, edges, ymin, ymax,
698 xunitName, yunitName, xfcnName, yfcnName);
699}
700
701//_____________________________________________________________________________
703 G4int nxbins, G4double xmin, G4double xmax,
704 G4int nybins, G4double ymin, G4double ymax,
705 G4double zmin, G4double zmax,
706 const G4String& xunitName, const G4String& yunitName,
707 const G4String& zunitName,
708 const G4String& xfcnName, const G4String& yfcnName,
709 const G4String& zfcnName,
710 const G4String& xbinSchemeName,
711 const G4String& ybinSchemeName)
712{
713 if ( ! CheckNbins(nxbins) ) return kInvalidId;
714 if ( ! CheckNbins(nybins) ) return kInvalidId;
715 if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
716 if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
717 if ( zmin != 0. || zmax != 0. ) {
718 // Do not check default values
719 if ( ! CheckMinMax(zmin, zmax) ) return kInvalidId;
720 }
721
722 return fVP2Manager->SetP2(id, nxbins, xmin, xmax, nybins, ymin, ymax,
723 zmin, zmax,
724 xunitName, yunitName, zunitName,
725 xfcnName, yfcnName, zfcnName,
726 xbinSchemeName, ybinSchemeName);
727}
728
729//_____________________________________________________________________________
731 const std::vector<G4double>& xedges,
732 const std::vector<G4double>& yedges,
733 G4double zmin, G4double zmax,
734 const G4String& xunitName,
735 const G4String& yunitName,
736 const G4String& zunitName,
737 const G4String& xfcnName,
738 const G4String& yfcnName,
739 const G4String& zfcnName)
740{
741 if ( ! CheckEdges(xedges) ) return kInvalidId;
742 if ( ! CheckEdges(yedges) ) return kInvalidId;
743 if ( zmin != 0. || zmax != 0. ) {
744 // Do not check default values
745 if ( ! CheckMinMax(zmin, zmax) ) return kInvalidId;
746 }
747
748 return fVP2Manager->SetP2(id, xedges, yedges, zmin, zmax,
749 xunitName, yunitName, zunitName,
750 xfcnName, yfcnName, zfcnName);
751}
752
753//_____________________________________________________________________________
755{
756 return fVP1Manager->ScaleP1(id, factor);
757}
758
759//_____________________________________________________________________________
761{
762 return fVP2Manager->ScaleP2(id, factor);
763}
764
765//_____________________________________________________________________________
767 const G4String& title)
768{
769 if ( ! CheckName(name, "Ntuple") ) return kInvalidId;
770
771 return fNtupleBookingManager->CreateNtuple(name, title);
772}
773
774//_____________________________________________________________________________
776{
777 if ( ! CheckName(name, "NtupleIColumn") ) return kInvalidId;
778
779 return fNtupleBookingManager->CreateNtupleIColumn(name, 0);
780}
781
782//_____________________________________________________________________________
784{
785 if ( ! CheckName(name, "NtupleFColumn") ) return kInvalidId;
786
787 return fNtupleBookingManager->CreateNtupleFColumn(name, 0);
788}
789
790//_____________________________________________________________________________
792{
793 if ( ! CheckName(name, "NtupleDColumn") ) return kInvalidId;
794
795 return fNtupleBookingManager->CreateNtupleDColumn(name, 0);
796}
797
798//_____________________________________________________________________________
800{
801 if ( ! CheckName(name, "NtupleSColumn") ) return kInvalidId;
802
803 return fNtupleBookingManager->CreateNtupleSColumn(name);
804}
805
806//_____________________________________________________________________________
808 std::vector<int>& vector)
809{
810 if ( ! CheckName(name, "NtupleIColumn") ) return kInvalidId;
811
812 return fNtupleBookingManager->CreateNtupleIColumn(name, &vector);
813}
814
815//_____________________________________________________________________________
817 std::vector<float>& vector)
818{
819 if ( ! CheckName(name, "NtupleFColumn") ) return kInvalidId;
820
821 return fNtupleBookingManager->CreateNtupleFColumn(name, &vector);
822}
823
824//_____________________________________________________________________________
826 std::vector<double>& vector)
827{
828 if ( ! CheckName(name, "NtupleDColumn") ) return kInvalidId;
829
830 return fNtupleBookingManager->CreateNtupleDColumn(name, &vector);
831}
832
833//_____________________________________________________________________________
835{
836 auto ntupleBooking = fNtupleBookingManager->FinishNtuple();
837
838 if ( fVNtupleManager ) {
839 fVNtupleManager->CreateNtuple(ntupleBooking);
840 }
841}
842
843//_____________________________________________________________________________
845 G4int /*nofReducedNtupleFiles*/)
846{
847// The function is overridden in the managers which supports ntuple merging
848// Here we give just a warning that the feature is not available.
849
850 NtupleMergingWarning("G4VAnalysisManager::SetNtupleMerging", GetType());
851}
852
853//_____________________________________________________________________________
855 G4bool /*rowMode*/)
856{
857// The function is overridden in the managers which supports ntuple merging
858// Here we give just a warning that the feature is not available.
859
860 NtupleMergingWarning("G4VAnalysisManager::SetNtupleRowWise", GetType());
861}
862
863//_____________________________________________________________________________
864void G4VAnalysisManager::SetBasketSize(unsigned int /*basketSize*/)
865{
866// The function is overridden in the managers which supports ntuple merging
867// Here we give just a warning that the feature is not available.
868
869 NtupleMergingWarning("G4VAnalysisManager::SetBasketSize", GetType());
870}
871
872//_____________________________________________________________________________
873void G4VAnalysisManager::SetBasketEntries(unsigned int /*basketEntries*/)
874{
875// The function is overridden in the managers which supports ntuple merging
876// Here we give just a warning that the feature is not available.
877
878 NtupleMergingWarning("G4VAnalysisManager::SetBasketEntries", GetType());
879}
880
881//_____________________________________________________________________________
883 const G4String& name)
884{
885 if ( ! CheckName(name, "NtupleIColumn") ) return kInvalidId;
886
887 return fNtupleBookingManager->CreateNtupleIColumn(ntupleId, name, 0);
888}
889
890//_____________________________________________________________________________
892 const G4String& name)
893{
894 if ( ! CheckName(name, "NtupleFColumn") ) return kInvalidId;
895
896 return fNtupleBookingManager->CreateNtupleFColumn(ntupleId, name, 0);
897}
898
899
900//_____________________________________________________________________________
902 const G4String& name)
903{
904 if ( ! CheckName(name, "NtupleDColumn") ) return kInvalidId;
905
906 return fNtupleBookingManager->CreateNtupleDColumn(ntupleId, name, 0);
907}
908
909//_____________________________________________________________________________
911 const G4String& name)
912{
913 if ( ! CheckName(name, "NtupleSColumn") ) return kInvalidId;
914
915 return fNtupleBookingManager->CreateNtupleSColumn(ntupleId, name);
916}
917
918//_____________________________________________________________________________
920 const G4String& name,
921 std::vector<int>& vector)
922{
923 if ( ! CheckName(name, "NtupleIColumn") ) return kInvalidId;
924
925 return fNtupleBookingManager->CreateNtupleIColumn(ntupleId, name, &vector);
926}
927
928//_____________________________________________________________________________
930 const G4String& name,
931 std::vector<float>& vector)
932{
933 if ( ! CheckName(name, "NtupleFColumn") ) return kInvalidId;
934
935 return fNtupleBookingManager->CreateNtupleFColumn(ntupleId, name, &vector);
936}
937
938//_____________________________________________________________________________
940 const G4String& name,
941 std::vector<double>& vector)
942{
943 if ( ! CheckName(name, "NtupleDColumn") ) return kInvalidId;
944
945 return fNtupleBookingManager->CreateNtupleDColumn(ntupleId, name, &vector);
946}
947
948//_____________________________________________________________________________
950{
951 auto ntupleBooking = fNtupleBookingManager->FinishNtuple(ntupleId);
952
953 if ( fVNtupleManager ) {
954 fVNtupleManager->CreateNtuple(ntupleBooking);
955 }
956}
957
958//_____________________________________________________________________________
960{
961 G4bool finalResult = true;
962
963 G4bool result = SetFirstH1Id(firstId);
964 finalResult = finalResult && result;
965
966 result = SetFirstH2Id(firstId);
967 finalResult = finalResult && result;
968
969 result = SetFirstH3Id(firstId);
970 finalResult = finalResult && result;
971
972 return finalResult;
973}
974
975//_____________________________________________________________________________
977{
978 return fH1HnManager->SetFirstId(firstId);
979}
980
981//_____________________________________________________________________________
983{
984 return fH2HnManager->SetFirstId(firstId);
985}
986
987//_____________________________________________________________________________
989{
990 return fH3HnManager->SetFirstId(firstId);
991}
992
993//_____________________________________________________________________________
995{
996 G4bool finalResult = true;
997
998 G4bool result = SetFirstP1Id(firstId);
999 finalResult = finalResult && result;
1000
1001 result = SetFirstP2Id(firstId);
1002 finalResult = finalResult && result;
1003
1004 return finalResult;
1005}
1006
1007//_____________________________________________________________________________
1009{
1010 return fP1HnManager->SetFirstId(firstId);
1011}
1012
1013//_____________________________________________________________________________
1015{
1016 return fP2HnManager->SetFirstId(firstId);
1017}
1018
1019//_____________________________________________________________________________
1021{
1022 auto finalResult = true;
1023
1024 auto result = fNtupleBookingManager->SetFirstId(firstId);
1025 finalResult = finalResult && result;
1026
1027 if ( fVNtupleManager ) {
1028 result = fVNtupleManager->SetFirstId(firstId);
1029 finalResult = finalResult && result;
1030 }
1031
1032 return finalResult;
1033}
1034
1035//_____________________________________________________________________________
1037{
1038 auto finalResult = true;
1039
1040 auto result = fNtupleBookingManager->SetFirstNtupleColumnId(firstId);
1041 finalResult = finalResult && result;
1042
1043 if ( fVNtupleManager ) {
1044 result = fVNtupleManager->SetFirstNtupleColumnId(firstId);
1045 finalResult = finalResult && result;
1046 }
1047
1048 return finalResult;
1049}
1050
1051// Fill methods in .icc
1052
1053//_____________________________________________________________________________
1055{
1056 fState.SetIsActivation(activation);
1057}
1058
1059// GetActivation() in .icc
1060
1061//_____________________________________________________________________________
1063{
1064// Return true if activation option is selected and any of managers has
1065// an activated object.
1066
1067 return fState.GetIsActivation() &&
1068 ( fH1HnManager->IsActive() ||
1069 fH2HnManager->IsActive() ||
1070 fH3HnManager->IsActive() ||
1071 fP1HnManager->IsActive() ||
1072 fP2HnManager->IsActive() );
1073}
1074
1075//_____________________________________________________________________________
1077{
1078// Return true any of managers has an object with activated ASCII option.
1079
1080 return ( fH1HnManager->IsAscii() ||
1081 fH2HnManager->IsAscii() ||
1082 fH3HnManager->IsAscii() ||
1083 fP1HnManager->IsAscii() ||
1084 fP2HnManager->IsAscii() );
1085}
1086
1087//_____________________________________________________________________________
1089{
1090// Return true any of managers has an object with activated plotting option.
1091
1092 return ( fH1HnManager->IsPlotting() ||
1093 fH2HnManager->IsPlotting() ||
1094 fH3HnManager->IsPlotting() ||
1095 fP1HnManager->IsPlotting() ||
1096 fP2HnManager->IsPlotting() );
1097}
1098
1099//_____________________________________________________________________________
1101{
1102// Return first H1 id
1103
1104 return fH1HnManager->GetFirstId();
1105}
1106
1107//_____________________________________________________________________________
1109{
1110// Return first H2 id
1111
1112 return fH2HnManager->GetFirstId();
1113}
1114
1115//_____________________________________________________________________________
1117{
1118// Return first H3 id
1119
1120 return fH3HnManager->GetFirstId();
1121}
1122
1123//_____________________________________________________________________________
1125{
1126// Return first P1 id
1127
1128 return fP1HnManager->GetFirstId();
1129}
1130
1131//_____________________________________________________________________________
1133{
1134// Return first P2 id
1135
1136 return fP2HnManager->GetFirstId();
1137}
1138
1139//_____________________________________________________________________________
1141{
1142// Return first Ntuple id
1143
1144 return fNtupleBookingManager->GetFirstId();
1145}
1146
1147//_____________________________________________________________________________
1149{
1150// Return first Ntuple column id
1151
1152 return fNtupleBookingManager->GetFirstNtupleColumnId();
1153}
1154
1155//_____________________________________________________________________________
1157{
1158 return fH1HnManager->GetNofHns();
1159}
1160
1161//_____________________________________________________________________________
1163{
1164 return fH2HnManager->GetNofHns();
1165}
1166
1167//_____________________________________________________________________________
1169{
1170 return fH3HnManager->GetNofHns();
1171}
1172
1173//_____________________________________________________________________________
1175{
1176 return fP1HnManager->GetNofHns();
1177}
1178
1179//_____________________________________________________________________________
1181{
1182 return fP2HnManager->GetNofHns();
1183}
1184
1185//_____________________________________________________________________________
1187{
1188 return fVNtupleManager->GetNofNtuples();
1189}
1190
1191// GetH1Id(), GetH2Id in .icc
1192
1193//_____________________________________________________________________________
1195{
1196// Set activation to a given H1 object
1197
1198 fH1HnManager->SetActivation(id, activation);
1199}
1200
1201//_____________________________________________________________________________
1203{
1204// Set activation to all H1 objects
1205
1206 fH1HnManager->SetActivation(activation);
1207}
1208
1209//_____________________________________________________________________________
1211{
1212 fH1HnManager->SetAscii(id, ascii);
1213}
1214
1215//_____________________________________________________________________________
1217{
1218 fH1HnManager->SetPlotting(id, plotting);
1219}
1220
1221//_____________________________________________________________________________
1223{
1224 fH1HnManager->SetFileName(id, fileName);
1225}
1226
1227//_____________________________________________________________________________
1229{
1230// Set activation to a given H2 object
1231
1232 fH2HnManager->SetActivation(id, activation);
1233}
1234
1235//_____________________________________________________________________________
1237{
1238// Set activation to all H2 objects
1239
1240 fH2HnManager->SetActivation(activation);
1241}
1242
1243//_____________________________________________________________________________
1245{
1246 fH2HnManager->SetAscii(id, ascii);
1247}
1248
1249//_____________________________________________________________________________
1251{
1252 fH2HnManager->SetPlotting(id, plotting);
1253}
1254
1255//_____________________________________________________________________________
1257{
1258 fH2HnManager->SetFileName(id, fileName);
1259}
1260
1261//_____________________________________________________________________________
1263{
1264// Set activation to a given H3 object
1265
1266 fH3HnManager->SetActivation(id, activation);
1267}
1268
1269//_____________________________________________________________________________
1271{
1272// Set activation to all H3 objects
1273
1274 fH3HnManager->SetActivation(activation);
1275}
1276
1277//_____________________________________________________________________________
1279{
1280 fH3HnManager->SetAscii(id, ascii);
1281}
1282
1283//_____________________________________________________________________________
1285{
1286 fH3HnManager->SetPlotting(id, plotting);
1287}
1288
1289//_____________________________________________________________________________
1291{
1292 fH3HnManager->SetFileName(id, fileName);
1293}
1294
1295//_____________________________________________________________________________
1297{
1298// Set activation to a given P1 object
1299
1300 fP1HnManager->SetActivation(id, activation);
1301}
1302
1303//_____________________________________________________________________________
1305{
1306// Set activation to all P1 objects
1307
1308 fP1HnManager->SetActivation(activation);
1309}
1310
1311//_____________________________________________________________________________
1313{
1314 fP1HnManager->SetAscii(id, ascii);
1315}
1316
1317//_____________________________________________________________________________
1319{
1320 fP1HnManager->SetPlotting(id, plotting);
1321}
1322
1323//_____________________________________________________________________________
1325{
1326 fP1HnManager->SetFileName(id, fileName);
1327}
1328
1329//_____________________________________________________________________________
1331{
1332// Set activation to a given P2 object
1333
1334 fP2HnManager->SetActivation(id, activation);
1335}
1336
1337//_____________________________________________________________________________
1339{
1340// Set activation to all P2 objects
1341
1342 fP2HnManager->SetActivation(activation);
1343}
1344
1345//_____________________________________________________________________________
1347{
1348 fP2HnManager->SetAscii(id, ascii);
1349}
1350
1351//_____________________________________________________________________________
1353{
1354 fP2HnManager->SetPlotting(id, plotting);
1355}
1356
1357//_____________________________________________________________________________
1359{
1360 fP2HnManager->SetFileName(id, fileName);
1361}
1362
1363//_____________________________________________________________________________
1365{
1366// Set activation to a given ntuple object
1367
1368 fNtupleBookingManager->SetActivation(id, activation);
1369 if ( fVNtupleManager ) {
1370 fVNtupleManager->SetActivation(id, activation);
1371 }
1372}
1373
1374//_____________________________________________________________________________
1376{
1377// Set activation to all ntuple objects
1378
1379 fNtupleBookingManager->SetActivation(activation);
1380 if ( fVNtupleManager ) {
1381 fVNtupleManager->SetActivation(activation);
1382 }
1383}
1384
1385//_____________________________________________________________________________
1387{
1388// Set activation to a given P2 object
1389
1390 fNtupleBookingManager->SetFileName(id, fileName);
1391}
1392
1393//_____________________________________________________________________________
1395{
1396// Set activation to all P2 objects
1397
1398 fNtupleBookingManager->SetFileName(fileName);
1399}
1400
1401// Access methods in .icc
1402
1403//_____________________________________________________________________________
1405{
1406 fState.SetVerboseLevel(verboseLevel);
1407}
1408
1409// GetVerboseLevel() in .icc
1410
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
const G4AnalysisVerbose * GetVerboseL3() const
const G4AnalysisVerbose * GetVerboseL1() const
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
G4int CreateP1(const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinSchemeName="linear")
virtual G4bool MergeImpl(tools::histo::hmpi *hmpi)=0
std::shared_ptr< G4PlotManager > fPlotManager
void SetH1Ascii(G4int id, G4bool ascii)
G4int GetFirstNtupleId() const
virtual G4bool IsOpenFileImpl() const =0
G4int CreateP2(const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4double zmin=0, G4double zmax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")
void SetH2FileName(G4int id, const G4String &fileName)
void SetH1Activation(G4bool activation)
void SetH1Plotting(G4int id, G4bool plotting)
void SetH3Ascii(G4int id, G4bool ascii)
void SetH1Manager(G4VH1Manager *h1Manager)
void SetH3Activation(G4bool activation)
G4int CreateH1(const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")
void SetH2Manager(G4VH2Manager *h2Manager)
G4int CreateNtupleIColumn(const G4String &name)
virtual G4bool WriteImpl()=0
G4String GetHistoDirectoryName() const
G4int CreateNtupleDColumn(const G4String &name)
void SetH3Plotting(G4int id, G4bool plotting)
void SetP2FileName(G4int id, const G4String &fileName)
void SetNtupleFileName(const G4String &fileName)
G4int CreateNtupleFColumn(const G4String &name)
G4bool SetH3(G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nzbins, G4double zmin, G4double zmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear", const G4String &zbinSchemeName="linear")
void SetP2Plotting(G4int id, G4bool plotting)
G4bool SetP1(G4int id, G4int nbins, G4double xmin, G4double xmax, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinSchemeName="linear")
G4bool SetFirstP1Id(G4int firstId)
G4bool SetP2(G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4double zmin=0, G4double zmax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")
virtual G4bool OpenFileImpl(const G4String &fileName)=0
G4VAnalysisManager(const G4String &type, G4bool isMaster)
void SetActivation(G4bool activation)
G4bool SetFirstNtupleColumnId(G4int firstId)
G4String GetFileName() const
G4String GetType() const
G4bool CloseFile(G4bool reset=true)
G4bool OpenFile(const G4String &fileName="")
void SetH3FileName(G4int id, const G4String &fileName)
std::shared_ptr< G4NtupleBookingManager > fNtupleBookingManager
G4bool ScaleP1(G4int id, G4double factor)
void SetPlotManager(std::shared_ptr< G4PlotManager > plotManager)
G4bool ScaleH3(G4int id, G4double factor)
void SetH2Ascii(G4int id, G4bool ascii)
G4int CreateNtupleSColumn(const G4String &name)
virtual G4bool PlotImpl()=0
void SetP1Ascii(G4int id, G4bool ascii)
G4int CreateH3(const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4int nzbins, G4double zmin, G4double zmax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear", const G4String &zbinSchemeName="linear")
G4bool SetFirstH3Id(G4int firstId)
G4bool SetHistoDirectoryName(const G4String &dirName)
G4AnalysisManagerState fState
void SetP2Activation(G4bool activation)
void SetH1FileName(G4int id, const G4String &fileName)
virtual void SetNtupleRowWise(G4bool rowWise, G4bool rowMode=true)
void SetP1Plotting(G4int id, G4bool plotting)
virtual void SetBasketSize(unsigned int basketSize)
void SetFileManager(std::shared_ptr< G4VFileManager > fileManager)
void SetP1FileName(G4int id, const G4String &fileName)
G4bool WriteAscii(const G4String &fileName)
virtual void SetNtupleMerging(G4bool mergeNtuples, G4int nofReducedNtupleFiles=0)
void SetP2Manager(G4VP2Manager *p2Manager)
void SetP1Activation(G4bool activation)
virtual void SetBasketEntries(unsigned int basketEntries)
G4int GetFirstNtupleColumnId() const
void SetVerboseLevel(G4int verboseLevel)
G4bool SetH1(G4int id, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")
void SetH2Activation(G4bool activation)
G4int CreateNtuple(const G4String &name, const G4String &title)
std::shared_ptr< G4VNtupleManager > fVNtupleManager
void SetNtupleManager(std::shared_ptr< G4VNtupleManager > ntupleManager)
G4bool SetFirstH2Id(G4int firstId)
void SetP1Manager(G4VP1Manager *p1Manager)
void SetH3Manager(G4VH3Manager *h3Manager)
G4bool SetFirstP2Id(G4int firstId)
G4bool 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", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")
std::shared_ptr< G4VFileManager > fVFileManager
G4bool SetFileName(const G4String &fileName)
void SetCompressionLevel(G4int level)
G4int 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", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")
void SetNtupleActivation(G4bool activation)
G4int GetCompressionLevel() const
G4bool SetFirstH1Id(G4int firstId)
G4bool ScaleH1(G4int id, G4double factor)
G4String GetNtupleDirectoryName() const
G4bool SetFirstNtupleId(G4int firstId)
G4bool IsOpenFile() const
G4bool SetFirstHistoId(G4int firstId)
G4bool SetFirstProfileId(G4int firstId)
G4bool SetNtupleDirectoryName(const G4String &dirName)
G4bool ScaleP2(G4int id, G4double factor)
virtual G4bool CloseFileImpl(G4bool reset)=0
G4bool ScaleH2(G4int id, G4double factor)
G4bool Merge(tools::histo::hmpi *hmpi)
void SetP2Ascii(G4int id, G4bool ascii)
void SetH2Plotting(G4int id, G4bool plotting)
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
std::unique_ptr< T > make_unique(Args &&... args)
G4bool CheckMinMax(G4double xmin, G4double xmax, const G4String &fcnName="none", const G4String &binSchemeName="linear")
G4bool CheckNbins(G4int nbins)
G4bool CheckEdges(const std::vector< G4double > &edges)
G4bool CheckName(const G4String &name, const G4String &objectType)
const G4int kInvalidId