Geant4  10.01.p03
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 // $Id: G4VAnalysisManager.cc 70604 2013-06-03 11:27:06Z ihrivnac $
27 
28 // Author: Ivana Hrivnacova, 09/07/2013 (ivana@ipno.in2p3.fr)
29 
30 #include "G4VAnalysisManager.hh"
31 #include "G4AnalysisMessenger.hh"
32 #include "G4AnalysisUtilities.hh"
33 #include "G4HnManager.hh"
34 #include "G4VH1Manager.hh"
35 #include "G4VH2Manager.hh"
36 #include "G4VH3Manager.hh"
37 #include "G4VP1Manager.hh"
38 #include "G4VP2Manager.hh"
39 #include "G4VNtupleManager.hh"
40 #include "G4VFileManager.hh"
41 
42 #include <iostream>
43 
44 using namespace G4Analysis;
45 
46 //_____________________________________________________________________________
48  : fState(type, isMaster),
49  fMessenger(0),
50  fH1HnManager(0),
51  fH2HnManager(0),
52  fH3HnManager(0),
53  fP1HnManager(0),
54  fP2HnManager(0),
55  fVH1Manager(0),
56  fVH2Manager(0),
57  fVH3Manager(0),
58  fVP1Manager(0),
59  fVP2Manager(0),
60  fVNtupleManager(0),
61  fVFileManager(0)
62 {
63  fMessenger = new G4AnalysisMessenger(this);
64 }
65 
66 //_____________________________________________________________________________
68 {
69  delete fMessenger;
70  delete fVH1Manager;
71  delete fVH2Manager;
72  delete fVH3Manager;
73  delete fVP1Manager;
74  delete fVP2Manager;
75  delete fVNtupleManager;
76  delete fVFileManager;
77 }
78 
79 //
80 // protected methods
81 //
82 
83 //_____________________________________________________________________________
85 {
86  fVH1Manager = h1Manager;
87  fH1HnManager = h1Manager->fHnManager;
89 }
90 
91 //_____________________________________________________________________________
93 {
94  fVH2Manager = h2Manager;
95  fH2HnManager = h2Manager->fHnManager;
97 }
98 
99 //_____________________________________________________________________________
101 {
102  fVH3Manager = h3Manager;
103  fH3HnManager = h3Manager->fHnManager;
105 }
106 
107 //_____________________________________________________________________________
109 {
110  fVP1Manager = p1Manager;
111  fP1HnManager = p1Manager->fHnManager;
113 }
114 
115 //_____________________________________________________________________________
117 {
118  fVP2Manager = p2Manager;
119  fP2HnManager = p2Manager->fHnManager;
121 }
122 
123 //_____________________________________________________________________________
125 {
126  fVNtupleManager = ntupleManager;
127 }
128 
129 //_____________________________________________________________________________
131 {
132  fVFileManager = fileManager;
133 }
134 
135 //_____________________________________________________________________________
137 {
138  G4bool finalResult = true;
139 
140  // Replace or add file extension .ascii
141  G4String name(fileName);
142  if ( name.find(".") != std::string::npos ) {
143  name.erase(name.find("."), name.length());
144  }
145  name.append(".ascii");
146 
147 #ifdef G4VERBOSE
148  if ( fState.GetVerboseL3() )
149  fState.GetVerboseL3()->Message("write ASCII", "file", name);
150 #endif
151 
152  std::ofstream output(name, std::ios::out);
153  if ( ! output ) {
154  G4ExceptionDescription description;
155  description
156  << "Cannot open file. File name is not defined.";
157  G4Exception("G4VAnalysisManager::WriteAscii()",
158  "Analysis_W001", JustWarning, description);
159  return false;
160  }
161  output.setf( std::ios::scientific, std::ios::floatfield );
162 
163  G4bool result = fVH1Manager->WriteOnAscii(output);
164  finalResult = finalResult && result;
165 
166  result = fVH2Manager->WriteOnAscii(output);
167  finalResult = finalResult && result;
168 
169  result = fVH3Manager->WriteOnAscii(output);
170  finalResult = finalResult && result;
171 
172  //result = fVP1Manager->WriteOnAscii(output);
173  //finalResult = finalResult && result;
174 
175  //result = fVP2Manager->WriteOnAscii(output);
176  //finalResult = finalResult && result;
177 
178 #ifdef G4VERBOSE
179  if ( fState.GetVerboseL1() )
180  fState.GetVerboseL1()->Message("write ASCII", "file", name, result);
181 #endif
182 
183  return finalResult;
184 }
185 
186 //
187 // public methods
188 //
189 
190 //_____________________________________________________________________________
192 {
193  if ( fileName != "" ) {
194  return OpenFileImpl(fileName);
195  }
196  else {
197  if ( fVFileManager->GetFileName() == "" ) {
198  G4ExceptionDescription description;
199  description
200  << "Cannot open file. File name is not defined.";
201  G4Exception("G4VFileManager::OpenFile()",
202  "Analysis_W001", JustWarning, description);
203  return false;
204  }
206  }
207 }
208 
209 //_____________________________________________________________________________
211 {
212  return WriteImpl();
213 }
214 
215 //_____________________________________________________________________________
217 {
218  return CloseFileImpl();
219 }
220 
221 //_____________________________________________________________________________
223 {
224  return fVFileManager->SetFileName(fileName);
225 }
226 
227 //_____________________________________________________________________________
229 {
230  return fVFileManager->SetHistoDirectoryName(dirName);
231 }
232 
233 //_____________________________________________________________________________
235 {
236  return fVFileManager->SetNtupleDirectoryName(dirName);
237 }
238 
239 //_____________________________________________________________________________
241 {
242  return fVFileManager->GetFileName();
243 }
244 
245 //_____________________________________________________________________________
247 {
249 }
250 
251 //_____________________________________________________________________________
253 {
255 }
256 
257 //_____________________________________________________________________________
259  G4int nbins, G4double xmin, G4double xmax,
260  const G4String& unitName, const G4String& fcnName,
261  const G4String& binSchemeName)
262 {
263  if ( ! CheckName(name, "H1") ) return kInvalidId;
264  if ( ! CheckNbins(nbins) ) return kInvalidId;
265  if ( ! CheckMinMax(xmin, xmax, fcnName, binSchemeName) ) return kInvalidId;
266 
267  return fVH1Manager->CreateH1(name, title, nbins, xmin, xmax,
268  unitName, fcnName, binSchemeName);
269 }
270 
271 //_____________________________________________________________________________
273  const std::vector<G4double>& edges,
274  const G4String& unitName, const G4String& fcnName)
275 {
276  if ( ! CheckName(name, "H1") ) return kInvalidId;
277  if ( ! CheckEdges(edges) ) return kInvalidId;
278 
279  return fVH1Manager->CreateH1(name, title, edges, unitName, fcnName);
280 }
281 
282 //_____________________________________________________________________________
284  G4int nxbins, G4double xmin, G4double xmax,
285  G4int nybins, G4double ymin, G4double ymax,
286  const G4String& xunitName, const G4String& yunitName,
287  const G4String& xfcnName, const G4String& yfcnName,
288  const G4String& xbinSchemeName,
289  const G4String& ybinSchemeName)
290 
291 {
292  if ( ! CheckName(name, "H2") ) return kInvalidId;
293 
294  if ( ! CheckNbins(nxbins) ) return kInvalidId;
295  if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
296 
297  if ( ! CheckNbins(nybins) ) return kInvalidId;
298  if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
299 
300  return fVH2Manager->CreateH2(name, title,
301  nxbins, xmin, xmax, nybins, ymin, ymax,
302  xunitName, yunitName, xfcnName, yfcnName,
303  xbinSchemeName, ybinSchemeName);
304 }
305 
306 //_____________________________________________________________________________
308  const std::vector<G4double>& xedges,
309  const std::vector<G4double>& yedges,
310  const G4String& xunitName, const G4String& yunitName,
311  const G4String& xfcnName, const G4String& yfcnName)
312 
313 {
314  if ( ! CheckName(name, "H2") ) return kInvalidId;
315 
316  if ( ! CheckEdges(xedges) ) return kInvalidId;
317  if ( ! CheckEdges(yedges) ) return kInvalidId;
318 
319  return fVH2Manager->CreateH2(name, title,
320  xedges, yedges,
321  xunitName, yunitName, xfcnName, yfcnName);
322 }
323 
324 //_____________________________________________________________________________
326  G4int nxbins, G4double xmin, G4double xmax,
327  G4int nybins, G4double ymin, G4double ymax,
328  G4int nzbins, G4double zmin, G4double zmax,
329  const G4String& xunitName, const G4String& yunitName,
330  const G4String& zunitName,
331  const G4String& xfcnName, const G4String& yfcnName,
332  const G4String& zfcnName,
333  const G4String& xbinSchemeName,
334  const G4String& ybinSchemeName,
335  const G4String& zbinSchemeName)
336 
337 {
338  if ( ! CheckName(name, "H3") ) return kInvalidId;
339 
340  if ( ! CheckNbins(nxbins) ) return kInvalidId;
341  if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
342 
343  if ( ! CheckNbins(nybins) ) return kInvalidId;
344  if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
345 
346  if ( ! CheckNbins(nzbins) ) return kInvalidId;
347  if ( ! CheckMinMax(zmin, zmax, zfcnName, zbinSchemeName) ) return kInvalidId;
348 
349  return fVH3Manager->CreateH3(name, title,
350  nxbins, xmin, xmax, nybins, ymin, ymax,
351  nzbins, zmin, zmax,
352  xunitName, yunitName, zunitName,
353  xfcnName, yfcnName, zfcnName,
354  xbinSchemeName, ybinSchemeName, zbinSchemeName);
355 }
356 
357 //_____________________________________________________________________________
359  const std::vector<G4double>& xedges,
360  const std::vector<G4double>& yedges,
361  const std::vector<G4double>& zedges,
362  const G4String& xunitName, const G4String& yunitName,
363  const G4String& zunitName,
364  const G4String& xfcnName, const G4String& yfcnName,
365  const G4String& zfcnName)
366 
367 {
368  if ( ! CheckName(name, "H3") ) return kInvalidId;
369 
370  if ( ! CheckEdges(xedges) ) return kInvalidId;
371  if ( ! CheckEdges(yedges) ) return kInvalidId;
372  if ( ! CheckEdges(zedges) ) return kInvalidId;
373 
374  return fVH3Manager->CreateH3(name, title,
375  xedges, yedges, zedges,
376  xunitName, yunitName, zunitName,
377  xfcnName, yfcnName, zfcnName);
378 }
379 
380 //_____________________________________________________________________________
382  G4int nbins, G4double xmin, G4double xmax,
383  const G4String& unitName, const G4String& fcnName,
384  const G4String& binSchemeName)
385 {
386  if ( ! CheckNbins(nbins) ) return kInvalidId;
387  if ( ! CheckMinMax(xmin, xmax, fcnName, binSchemeName) ) return kInvalidId;
388 
389  return fVH1Manager->SetH1(id, nbins, xmin, xmax, unitName, fcnName, binSchemeName);
390 }
391 
392 //_____________________________________________________________________________
394  const std::vector<G4double>& edges,
395  const G4String& unitName, const G4String& fcnName)
396 {
397  if ( ! CheckEdges(edges) ) return kInvalidId;
398 
399  return fVH1Manager->SetH1(id, edges, unitName, fcnName);
400 }
401 
402 //_____________________________________________________________________________
404  G4int nxbins, G4double xmin, G4double xmax,
405  G4int nybins, G4double ymin, G4double ymax,
406  const G4String& xunitName, const G4String& yunitName,
407  const G4String& xfcnName, const G4String& yfcnName,
408  const G4String& xbinSchemeName,
409  const G4String& ybinSchemeName)
410 {
411  if ( ! CheckNbins(nxbins) ) return kInvalidId;
412  if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
413 
414  if ( ! CheckNbins(nybins) ) return kInvalidId;
415  if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
416 
417  return fVH2Manager->SetH2(id, nxbins, xmin, xmax, nybins, ymin, ymax,
418  xunitName, yunitName, xfcnName, yfcnName,
419  xbinSchemeName, ybinSchemeName);
420 }
421 
422 //_____________________________________________________________________________
424  const std::vector<G4double>& xedges,
425  const std::vector<G4double>& yedges,
426  const G4String& xunitName, const G4String& yunitName,
427  const G4String& xfcnName, const G4String& yfcnName)
428 {
429  if ( ! CheckEdges(xedges) ) return kInvalidId;
430  if ( ! CheckEdges(yedges) ) return kInvalidId;
431 
432  return fVH2Manager->SetH2(id, xedges, yedges,
433  xunitName, yunitName, xfcnName, yfcnName);
434 }
435 
436 //_____________________________________________________________________________
438  G4int nxbins, G4double xmin, G4double xmax,
439  G4int nybins, G4double ymin, G4double ymax,
440  G4int nzbins, G4double zmin, G4double zmax,
441  const G4String& xunitName, const G4String& yunitName,
442  const G4String& zunitName,
443  const G4String& xfcnName, const G4String& yfcnName,
444  const G4String& zfcnName,
445  const G4String& xbinSchemeName,
446  const G4String& ybinSchemeName,
447  const G4String& zbinSchemeName)
448 {
449  if ( ! CheckNbins(nxbins) ) return kInvalidId;
450  if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
451 
452  if ( ! CheckNbins(nybins) ) return kInvalidId;
453  if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
454 
455  if ( ! CheckNbins(nzbins) ) return kInvalidId;
456  if ( ! CheckMinMax(zmin, zmax, zfcnName, zbinSchemeName) ) return kInvalidId;
457 
458  return fVH3Manager->SetH3(id,
459  nxbins, xmin, xmax, nybins, ymin, ymax,
460  nzbins, zmin, zmax,
461  xunitName, yunitName, zunitName,
462  xfcnName, yfcnName, zfcnName,
463  xbinSchemeName, ybinSchemeName, zbinSchemeName);
464 }
465 
466 //_____________________________________________________________________________
468  const std::vector<G4double>& xedges,
469  const std::vector<G4double>& yedges,
470  const std::vector<G4double>& zedges,
471  const G4String& xunitName, const G4String& yunitName,
472  const G4String& zunitName,
473  const G4String& xfcnName, const G4String& yfcnName,
474  const G4String& zfcnName)
475 {
476  if ( ! CheckEdges(xedges) ) return kInvalidId;
477  if ( ! CheckEdges(yedges) ) return kInvalidId;
478  if ( ! CheckEdges(zedges) ) return kInvalidId;
479 
480  return fVH3Manager->SetH3(id, xedges, yedges, zedges,
481  xunitName, yunitName, zunitName,
482  xfcnName, yfcnName, zfcnName);
483 }
484 
485 //_____________________________________________________________________________
487 {
488  return fVH1Manager->ScaleH1(id, factor);
489 }
490 
491 //_____________________________________________________________________________
493 {
494  return fVH2Manager->ScaleH2(id, factor);
495 }
496 
497 //_____________________________________________________________________________
499 {
500  return fVH3Manager->ScaleH3(id, factor);
501 }
502 
503 //_____________________________________________________________________________
505  G4int nbins, G4double xmin, G4double xmax,
506  G4double ymin, G4double ymax,
507  const G4String& xunitName, const G4String& yunitName,
508  const G4String& xfcnName, const G4String& yfcnName,
509  const G4String& xbinSchemeName)
510 {
511  if ( ! CheckName(name, "P1") ) return kInvalidId;
512  if ( ! CheckNbins(nbins) ) return kInvalidId;
513  if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
514  if ( ! CheckMinMax(ymin, ymax) ) return kInvalidId;
515 
516  return fVP1Manager->CreateP1(name, title, nbins, xmin, xmax, ymin, ymax,
517  xunitName, yunitName, xfcnName, yfcnName,
518  xbinSchemeName);
519 }
520 
521 //_____________________________________________________________________________
523  const std::vector<G4double>& edges,
524  G4double ymin, G4double ymax,
525  const G4String& xunitName, const G4String& yunitName,
526  const G4String& xfcnName, const G4String& yfcnName)
527 {
528  if ( ! CheckName(name, "P1") ) return kInvalidId;
529  if ( ! CheckEdges(edges) ) return kInvalidId;
530 
531  return fVP1Manager->CreateP1(name, title, edges, ymin, ymax,
532  xunitName, yunitName, xfcnName, yfcnName);
533 }
534 
535 //_____________________________________________________________________________
537  G4int nxbins, G4double xmin, G4double xmax,
538  G4int nybins, G4double ymin, G4double ymax,
539  G4double zmin, G4double zmax,
540  const G4String& xunitName, const G4String& yunitName,
541  const G4String& zunitName,
542  const G4String& xfcnName, const G4String& yfcnName,
543  const G4String& zfcnName,
544  const G4String& xbinSchemeName,
545  const G4String& ybinSchemeName)
546 {
547  if ( ! CheckName(name, "P2") ) return kInvalidId;
548  if ( ! CheckNbins(nxbins) ) return kInvalidId;
549  if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
550  if ( ! CheckMinMax(ymin, ymax, yfcnName, xbinSchemeName) ) return kInvalidId;
551  if ( ! CheckMinMax(zmin, zmax) ) return kInvalidId;
552 
553  return fVP2Manager->CreateP2(name, title,
554  nxbins, xmin, xmax, nybins, ymin, ymax,
555  zmin, zmax,
556  xunitName, yunitName, zunitName,
557  xfcnName, yfcnName, zfcnName,
558  xbinSchemeName, ybinSchemeName);
559 }
560 
561 //_____________________________________________________________________________
563  const std::vector<G4double>& xedges,
564  const std::vector<G4double>& yedges,
565  G4double zmin, G4double zmax,
566  const G4String& xunitName, const G4String& yunitName,
567  const G4String& zunitName,
568  const G4String& xfcnName, const G4String& yfcnName,
569  const G4String& zfcnName)
570 {
571  if ( ! CheckName(name, "P2") ) return kInvalidId;
572  if ( ! CheckEdges(xedges) ) return kInvalidId;
573  if ( ! CheckEdges(yedges) ) return kInvalidId;
574 
575  return fVP2Manager->CreateP2(name, title, xedges, yedges, zmin, zmax,
576  xunitName, yunitName, zunitName,
577  xfcnName, yfcnName, zfcnName);
578 }
579 
580 //_____________________________________________________________________________
582  G4int nbins, G4double xmin, G4double xmax,
583  G4double ymin, G4double ymax,
584  const G4String& xunitName, const G4String& yunitName,
585  const G4String& xfcnName, const G4String& yfcnName,
586  const G4String& xbinSchemeName)
587 {
588  if ( ! CheckNbins(nbins) ) return kInvalidId;
589  if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
590 
591  return fVP1Manager->SetP1(id, nbins, xmin, xmax, ymin, ymax,
592  xunitName, yunitName, xfcnName, yfcnName,
593  xbinSchemeName);
594 }
595 
596 //_____________________________________________________________________________
598  const std::vector<G4double>& edges,
599  G4double ymin, G4double ymax,
600  const G4String& xunitName, const G4String& yunitName,
601  const G4String& xfcnName, const G4String& yfcnName)
602 {
603  if ( ! CheckEdges(edges) ) return kInvalidId;
604 
605  return fVP1Manager->SetP1(id, edges, ymin, ymax,
606  xunitName, yunitName, xfcnName, yfcnName);
607 }
608 
609 //_____________________________________________________________________________
611  G4int nxbins, G4double xmin, G4double xmax,
612  G4int nybins, G4double ymin, G4double ymax,
613  G4double zmin, G4double zmax,
614  const G4String& xunitName, const G4String& yunitName,
615  const G4String& zunitName,
616  const G4String& xfcnName, const G4String& yfcnName,
617  const G4String& zfcnName,
618  const G4String& xbinSchemeName,
619  const G4String& ybinSchemeName)
620 {
621  if ( ! CheckNbins(nxbins) ) return kInvalidId;
622  if ( ! CheckNbins(nybins) ) return kInvalidId;
623  if ( ! CheckMinMax(xmin, xmax, xfcnName, xbinSchemeName) ) return kInvalidId;
624  if ( ! CheckMinMax(ymin, ymax, yfcnName, ybinSchemeName) ) return kInvalidId;
625 
626  return fVP2Manager->SetP2(id, nxbins, xmin, xmax, nybins, ymin, ymax,
627  zmin, zmax,
628  xunitName, yunitName, zunitName,
629  xfcnName, yfcnName, zfcnName,
630  xbinSchemeName, ybinSchemeName);
631 }
632 
633 //_____________________________________________________________________________
635  const std::vector<G4double>& xedges,
636  const std::vector<G4double>& yedges,
637  G4double zmin, G4double zmax,
638  const G4String& xunitName,
639  const G4String& yunitName,
640  const G4String& zunitName,
641  const G4String& xfcnName,
642  const G4String& yfcnName,
643  const G4String& zfcnName)
644 {
645  if ( ! CheckEdges(xedges) ) return kInvalidId;
646  if ( ! CheckEdges(yedges) ) return kInvalidId;
647 
648  return fVP2Manager->SetP2(id, xedges, yedges, zmin, zmax,
649  xunitName, yunitName, zunitName,
650  xfcnName, yfcnName, zfcnName);
651 }
652 
653 //_____________________________________________________________________________
655 {
656  return fVP1Manager->ScaleP1(id, factor);
657 }
658 
659 //_____________________________________________________________________________
661 {
662  return fVP2Manager->ScaleP2(id, factor);
663 }
664 
665 //_____________________________________________________________________________
667  const G4String& title)
668 {
669  if ( ! CheckName(name, "Ntuple") ) return kInvalidId;
670 
671  return fVNtupleManager->CreateNtuple(name, title);
672 }
673 
674 //_____________________________________________________________________________
676 {
677  if ( ! CheckName(name, "NtupleIColumn") ) return kInvalidId;
678 
679  return fVNtupleManager->CreateNtupleIColumn(name, 0);
680 }
681 
682 //_____________________________________________________________________________
684 {
685  if ( ! CheckName(name, "NtupleFColumn") ) return kInvalidId;
686 
687  return fVNtupleManager->CreateNtupleFColumn(name, 0);
688 }
689 
690 //_____________________________________________________________________________
692 {
693  if ( ! CheckName(name, "NtupleDColumn") ) return kInvalidId;
694 
695  return fVNtupleManager->CreateNtupleDColumn(name, 0);
696 }
697 
698 //_____________________________________________________________________________
700 {
701  if ( ! CheckName(name, "NtupleSColumn") ) return kInvalidId;
702 
703  return fVNtupleManager->CreateNtupleSColumn(name);
704 }
705 
706 //_____________________________________________________________________________
708  std::vector<int>& vector)
709 {
710  if ( ! CheckName(name, "NtupleIColumn") ) return kInvalidId;
711 
712  return fVNtupleManager->CreateNtupleIColumn(name, &vector);
713 }
714 
715 //_____________________________________________________________________________
717  std::vector<float>& vector)
718 {
719  if ( ! CheckName(name, "NtupleFColumn") ) return kInvalidId;
720 
721  return fVNtupleManager->CreateNtupleFColumn(name, &vector);
722 }
723 
724 //_____________________________________________________________________________
726  std::vector<double>& vector)
727 {
728  if ( ! CheckName(name, "NtupleDColumn") ) return kInvalidId;
729 
730  return fVNtupleManager->CreateNtupleDColumn(name, &vector);
731 }
732 
733 //_____________________________________________________________________________
735 {
736  return fVNtupleManager->FinishNtuple();
737 }
738 
739 //_____________________________________________________________________________
741  const G4String& name)
742 {
743  if ( ! CheckName(name, "NtupleIColumn") ) return kInvalidId;
744 
745  return fVNtupleManager->CreateNtupleIColumn(ntupleId, name, 0);
746 }
747 
748 //_____________________________________________________________________________
750  const G4String& name)
751 {
752  if ( ! CheckName(name, "NtupleFColumn") ) return kInvalidId;
753 
754  return fVNtupleManager->CreateNtupleFColumn(ntupleId, name, 0);
755 }
756 
757 
758 //_____________________________________________________________________________
760  const G4String& name)
761 {
762  if ( ! CheckName(name, "NtupleDColumn") ) return kInvalidId;
763 
764  return fVNtupleManager->CreateNtupleDColumn(ntupleId, name, 0);
765 }
766 
767 //_____________________________________________________________________________
769  const G4String& name)
770 {
771  if ( ! CheckName(name, "NtupleSColumn") ) return kInvalidId;
772 
773  return fVNtupleManager->CreateNtupleSColumn(ntupleId, name);
774 }
775 
776 //_____________________________________________________________________________
778  const G4String& name,
779  std::vector<int>& vector)
780 {
781  if ( ! CheckName(name, "NtupleIColumn") ) return kInvalidId;
782 
783  return fVNtupleManager->CreateNtupleIColumn(ntupleId, name, &vector);
784 }
785 
786 //_____________________________________________________________________________
788  const G4String& name,
789  std::vector<float>& vector)
790 {
791  if ( ! CheckName(name, "NtupleFColumn") ) return kInvalidId;
792 
793  return fVNtupleManager->CreateNtupleFColumn(ntupleId, name, &vector);
794 }
795 
796 //_____________________________________________________________________________
798  const G4String& name,
799  std::vector<double>& vector)
800 {
801  if ( ! CheckName(name, "NtupleDColumn") ) return kInvalidId;
802 
803  return fVNtupleManager->CreateNtupleDColumn(ntupleId, name, &vector);
804 }
805 
806 //_____________________________________________________________________________
808 {
809  return fVNtupleManager->FinishNtuple(ntupleId);
810 }
811 
812 //_____________________________________________________________________________
814 {
815  G4bool finalResult = true;
816 
817  G4bool result = SetFirstH1Id(firstId);
818  finalResult = finalResult && result;
819 
820  result = SetFirstH2Id(firstId);
821  finalResult = finalResult && result;
822 
823  result = SetFirstH3Id(firstId);
824  finalResult = finalResult && result;
825 
826  return finalResult;
827 }
828 
829 //_____________________________________________________________________________
831 {
832  G4bool finalResult = true;
833  G4bool result = fVH1Manager->SetFirstId(firstId);
834  finalResult = finalResult && result;
835 
836  result = fH1HnManager->SetFirstId(firstId);
837  finalResult = finalResult && result;
838 
839  return finalResult;
840 }
841 
842 //_____________________________________________________________________________
844 {
845  G4bool finalResult = true;
846  G4bool result = fVH2Manager->SetFirstId(firstId);
847  finalResult = finalResult && result;
848 
849  result = fH2HnManager->SetFirstId(firstId);
850  finalResult = finalResult && result;
851 
852  return finalResult;
853 }
854 
855 //_____________________________________________________________________________
857 {
858  G4bool finalResult = true;
859  G4bool result = fVH3Manager->SetFirstId(firstId);
860  finalResult = finalResult && result;
861 
862  result = fH3HnManager->SetFirstId(firstId);
863  finalResult = finalResult && result;
864 
865  return finalResult;
866 }
867 
868 //_____________________________________________________________________________
870 {
871  G4bool finalResult = true;
872 
873  G4bool result = SetFirstP1Id(firstId);
874  finalResult = finalResult && result;
875 
876  result = SetFirstP2Id(firstId);
877  finalResult = finalResult && result;
878 
879  return finalResult;
880 }
881 
882 //_____________________________________________________________________________
884 {
885  G4bool finalResult = true;
886  G4bool result = fVP1Manager->SetFirstId(firstId);
887  finalResult = finalResult && result;
888 
889  result = fP1HnManager->SetFirstId(firstId);
890  finalResult = finalResult && result;
891 
892  return finalResult;
893 }
894 
895 //_____________________________________________________________________________
897 {
898  G4bool finalResult = true;
899  G4bool result = fVP2Manager->SetFirstId(firstId);
900  finalResult = finalResult && result;
901 
902  result = fP2HnManager->SetFirstId(firstId);
903  finalResult = finalResult && result;
904 
905  return finalResult;
906 }
907 
908 //_____________________________________________________________________________
910 {
911  return fVNtupleManager->SetFirstId(firstId);
912 }
913 
914 //_____________________________________________________________________________
916 {
917  return fVNtupleManager->SetFirstNtupleColumnId(firstId);
918 }
919 
920 // Fill methods in .icc
921 
922 //_____________________________________________________________________________
924 {
925  fState.SetIsActivation(activation);
926 }
927 
928 // GetActivation() in .icc
929 
930 //_____________________________________________________________________________
932 {
933 // Return true if activation option is selected and any of managers has
934 // an activated object.
935 
936  return fState.GetIsActivation() &&
939  fP2HnManager->IsActive() );
940 }
941 
942 
943 //_____________________________________________________________________________
945 {
946 // Return true any of managers has an object with activated ASCII option.
947 
948  return ( fH1HnManager->IsAscii() || fH2HnManager->IsAscii() );
949 }
950 
951 //_____________________________________________________________________________
953 {
954 // Return first H1 id
955 
956  return fVH1Manager->GetFirstId();
957 }
958 
959 //_____________________________________________________________________________
961 {
962 // Return first H2 id
963 
964  return fVH2Manager->GetFirstId();
965 }
966 
967 //_____________________________________________________________________________
969 {
970 // Return first H3 id
971 
972  return fVH3Manager->GetFirstId();
973 }
974 
975 //_____________________________________________________________________________
977 {
978 // Return first P1 id
979 
980  return fVP1Manager->GetFirstId();
981 }
982 
983 //_____________________________________________________________________________
985 {
986 // Return first P2 id
987 
988  return fVP2Manager->GetFirstId();
989 }
990 
991 //_____________________________________________________________________________
993 {
994 // Return first Ntuple id
995 
996  return fVNtupleManager->GetFirstId();
997 }
998 
999 //_____________________________________________________________________________
1001 {
1002 // Return first Ntuple column id
1003 
1005 }
1006 
1007 //_____________________________________________________________________________
1009 {
1010  return fH1HnManager->GetNofHns();
1011 }
1012 
1013 //_____________________________________________________________________________
1015 {
1016  return fH2HnManager->GetNofHns();
1017 }
1018 
1019 //_____________________________________________________________________________
1021 {
1022  return fH3HnManager->GetNofHns();
1023 }
1024 
1025 //_____________________________________________________________________________
1027 {
1028  return fP1HnManager->GetNofHns();
1029 }
1030 
1031 //_____________________________________________________________________________
1033 {
1034  return fP2HnManager->GetNofHns();
1035 }
1036 
1037 //_____________________________________________________________________________
1039 {
1040  return fVNtupleManager->GetNofNtuples();
1041 }
1042 
1043 // GetH1Id(), GetH2Id in .icc
1044 
1045 //_____________________________________________________________________________
1047 {
1048 // Set activation to a given H1 object
1049 
1050  fH1HnManager->SetActivation(id, activation);
1051 }
1052 
1053 //_____________________________________________________________________________
1055 {
1056 // Set activation to all H1 objects
1057 
1058  fH1HnManager->SetActivation(activation);
1059 }
1060 
1061 //_____________________________________________________________________________
1063 {
1064  fH1HnManager->SetAscii(id, ascii);
1065 }
1066 
1067 //_____________________________________________________________________________
1069 {
1070 // Set activation to a given H2 object
1071 
1072  fH2HnManager->SetActivation(id, activation);
1073 }
1074 
1075 //_____________________________________________________________________________
1077 {
1078 // Set activation to all H2 objects
1079 
1080  fH2HnManager->SetActivation(activation);
1081 }
1082 
1083 //_____________________________________________________________________________
1085 {
1086  fH2HnManager->SetAscii(id, ascii);
1087 }
1088 
1089 //_____________________________________________________________________________
1091 {
1092 // Set activation to a given H3 object
1093 
1094  fH3HnManager->SetActivation(id, activation);
1095 }
1096 
1097 //_____________________________________________________________________________
1099 {
1100 // Set activation to all H3 objects
1101 
1102  fH3HnManager->SetActivation(activation);
1103 }
1104 
1105 //_____________________________________________________________________________
1107 {
1108  fH3HnManager->SetAscii(id, ascii);
1109 }
1110 
1111 //_____________________________________________________________________________
1113 {
1114 // Set activation to a given P1 object
1115 
1116  fP1HnManager->SetActivation(id, activation);
1117 }
1118 
1119 //_____________________________________________________________________________
1121 {
1122 // Set activation to all P1 objects
1123 
1124  fP1HnManager->SetActivation(activation);
1125 }
1126 
1127 //_____________________________________________________________________________
1129 {
1130  fP1HnManager->SetAscii(id, ascii);
1131 }
1132 
1133 //_____________________________________________________________________________
1135 {
1136 // Set activation to a given P2 object
1137 
1138  fP2HnManager->SetActivation(id, activation);
1139 }
1140 
1141 //_____________________________________________________________________________
1143 {
1144 // Set activation to all P2 objects
1145 
1146  fP2HnManager->SetActivation(activation);
1147 }
1148 
1149 //_____________________________________________________________________________
1151 {
1152  fP2HnManager->SetAscii(id, ascii);
1153 }
1154 
1155 // Access methods in .icc
1156 
1157 //_____________________________________________________________________________
1159 {
1160  fState.SetVerboseLevel(verboseLevel);
1161 }
1162 
1163 // GetVerboseLevel() in .icc
1164 
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")
void SetP1Manager(G4VP1Manager *p1Manager)
G4bool SetHistoDirectoryName(const G4String &dirName)
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
G4bool IsAscii() const
Definition: G4HnManager.cc:162
G4HnManager * fHnManager
void SetH2Ascii(G4int id, G4bool ascii)
G4bool SetNtupleDirectoryName(const G4String &dirName)
G4String GetNtupleDirectoryName() const
G4AnalysisMessenger * fMessenger
virtual 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 &xbinScheme="linear", const G4String &ybinScheme="linear", const G4String &zbinScheme="linear")=0
G4int CreateNtupleIColumn(const G4String &name)
G4bool SetFirstHistoId(G4int firstId)
G4VH2Manager * fVH2Manager
virtual G4int GetNofNtuples() const =0
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void SetP1HnManager(G4HnManager *h1HnManager)
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")
virtual G4bool ScaleH3(G4int id, G4double factor)=0
G4HnManager * fP1HnManager
G4bool ScaleH1(G4int id, G4double factor)
G4bool ScaleH2(G4int id, G4double factor)
void SetH2HnManager(G4HnManager *h2HnManager)
void SetH1Manager(G4VH1Manager *h1Manager)
void SetP2Activation(G4bool activation)
G4String name
Definition: TRTMaterials.hh:40
virtual G4bool WriteImpl()=0
void SetVerboseLevel(G4int verboseLevel)
G4bool SetFirstId(G4int firstId)
G4bool IsAscii() const
void SetH2Activation(G4bool activation)
G4int CreateNtuple(const G4String &name, const G4String &title)
G4VFileManager * fVFileManager
G4int GetFirstP2Id() const
virtual G4int CreateNtupleSColumn(const G4String &name)=0
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")
G4int GetFirstH2Id() const
G4int GetFirstH1Id() const
virtual 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 &xbinScheme="linear", const G4String &ybinScheme="linear", const G4String &zbinScheme="linear")=0
G4VNtupleManager * fVNtupleManager
G4bool SetFileName(const G4String &fileName)
G4bool ScaleH3(G4int id, G4double factor)
G4int CreateNtupleSColumn(const G4String &name)
G4bool SetNtupleDirectoryName(const G4String &dirName)
int G4int
Definition: G4Types.hh:78
G4int GetFirstP1Id() const
virtual 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 &xbinScheme="linear", const G4String &ybinScheme="linear")=0
virtual G4bool ScaleH2(G4int id, G4double factor)=0
void SetP1Activation(G4bool activation)
void SetH1HnManager(G4HnManager *h1HnManager)
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")
G4HnManager * fHnManager
G4int GetFirstNtupleColumnId() const
G4bool OpenFile(const G4String &fileName="")
virtual G4bool WriteOnAscii(std::ofstream &output)=0
virtual 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 &xbinScheme="linear", const G4String &ybinScheme="linear")=0
void SetH3Manager(G4VH3Manager *h3Manager)
void SetP2HnManager(G4HnManager *h2HnManager)
G4bool SetFirstH1Id(G4int firstId)
G4HnManager * fHnManager
G4String GetNtupleDirectoryName() const
G4VAnalysisManager(const G4String &type, G4bool isMaster)
void SetH3Ascii(G4int id, G4bool ascii)
virtual G4int CreateNtuple(const G4String &name, const G4String &title)=0
G4VH3Manager * fVH3Manager
G4bool SetFirstProfileId(G4int firstId)
const G4AnalysisVerbose * GetVerboseL3() const
void SetH1Ascii(G4int id, G4bool ascii)
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")
void SetP2Manager(G4VP2Manager *p2Manager)
G4bool SetFirstNtupleColumnId(G4int firstId)
G4bool CheckName(const G4String &name, const G4String &objectType)
virtual void FinishNtuple()=0
G4int GetNofNtuples() const
G4VP1Manager * fVP1Manager
G4String GetHistoDirectoryName() const
G4VH1Manager * fVH1Manager
bool G4bool
Definition: G4Types.hh:79
virtual G4bool OpenFileImpl(const G4String &fileName)=0
void SetIsActivation(G4bool isActivation)
G4int GetFirstH3Id() const
virtual G4bool ScaleP1(G4int id, G4double factor)=0
G4bool SetFirstP1Id(G4int firstId)
virtual G4int CreateNtupleFColumn(const G4String &name, std::vector< float > *vector)=0
virtual G4int CreateNtupleIColumn(const G4String &name, std::vector< int > *vector)=0
void SetAscii(G4int id, G4bool ascii)
Definition: G4HnManager.cc:209
G4bool SetH1(G4int id, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")
virtual 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 &xbinScheme="linear", const G4String &ybinScheme="linear")=0
virtual 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 &xbinScheme="linear", const G4String &ybinScheme="linear")=0
G4String GetFileName() const
G4bool IsActive() const
G4bool ScaleP2(G4int id, G4double factor)
void SetFileManager(G4VFileManager *fileManager)
G4String GetHistoDirectoryName() const
G4HnManager * fHnManager
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
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")
void SetH2Manager(G4VH2Manager *h2Manager)
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")
G4HnManager * fH2HnManager
G4bool SetFirstNtupleId(G4int firstId)
virtual G4bool ScaleP2(G4int id, G4double factor)=0
G4bool SetFirstH3Id(G4int firstId)
G4HnManager * fP2HnManager
G4HnManager * fHnManager
G4bool SetFirstP2Id(G4int firstId)
void SetH3HnManager(G4HnManager *h2HnManager)
static const G4double factor
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")
virtual 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 &xbinScheme="linear")=0
G4String & append(const G4String &)
void SetH1Activation(G4bool activation)
virtual G4bool WriteOnAscii(std::ofstream &output)=0
void SetActivation(G4bool activation)
void SetP2Ascii(G4int id, G4bool ascii)
G4int CreateNtupleFColumn(const G4String &name)
G4HnManager * fH1HnManager
void SetH3Activation(G4bool activation)
void SetP1Ascii(G4int id, G4bool ascii)
virtual G4bool SetFileName(const G4String &fileName)
G4bool CheckNbins(G4int nbins)
G4bool SetFirstNtupleColumnId(G4int firstId)
virtual G4bool SetH1(G4int id, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")=0
G4bool SetFirstH2Id(G4int firstId)
G4int GetFirstNtupleColumnId() const
G4int CreateNtupleDColumn(const G4String &name)
G4bool SetHistoDirectoryName(const G4String &dirName)
virtual G4bool ScaleH1(G4int id, G4double factor)=0
double G4double
Definition: G4Types.hh:76
G4HnManager * fH3HnManager
G4VP2Manager * fVP2Manager
G4bool IsActive() const
Definition: G4HnManager.cc:156
virtual 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 &xbinScheme="linear")=0
virtual G4int CreateNtupleDColumn(const G4String &name, std::vector< double > *vector)=0
G4String GetFileName() const
G4AnalysisManagerState fState
virtual G4bool WriteOnAscii(std::ofstream &output)=0
void SetVerboseLevel(G4int verboseLevel)
const G4int kInvalidId
virtual G4bool CloseFileImpl()=0
G4int GetFirstNtupleId() const
const G4AnalysisVerbose * GetVerboseL1() const
void SetActivation(G4bool activation)
Definition: G4HnManager.cc:188
void SetNtupleManager(G4VNtupleManager *ntupleManager)
G4bool CheckMinMax(G4double xmin, G4double xmax, const G4String &fcnName="none", const G4String &binSchemeName="linear")
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")
G4bool CheckEdges(const std::vector< G4double > &edges)
G4bool ScaleP1(G4int id, G4double factor)
G4int GetNofHns() const
Definition: G4HnManager.hh:128
G4bool WriteAscii(const G4String &fileName)
virtual 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")=0