The Gaudi Framework  master (37c0b60a)
HistogramPersistencySvc.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 // ===========================================================================
12 //
13 // HistogramPersistencySvc.h
14 // ------------------------------------------------------------
15 //
16 // Package : PersistencySvc
17 //
18 // Author : Markus Frank
19 //
20 // ===========================================================
21 #ifndef PERSISTENCYSVC_HISTOGRAMPERSISTENCYSVC_H
22 #define PERSISTENCYSVC_HISTOGRAMPERSISTENCYSVC_H 1
23 // ============================================================================
24 // Incldue files
25 // ============================================================================
26 // STD & STL
27 // ============================================================================
28 #include <set>
29 #include <string>
30 #include <vector>
31 // ============================================================================
32 // local
33 // ============================================================================
34 #include "../PersistencySvc/PersistencySvc.h"
35 // ============================================================================
57 class HistogramPersistencySvc : virtual public PersistencySvc {
58 public:
61  StatusCode initialize() override;
64  StatusCode reinitialize() override;
66  StatusCode finalize() override;
68  StatusCode createRep( DataObject* pObject, IOpaqueAddress*& refpAddress ) override;
70 
75 
77 public:
78  // ==========================================================================
80  typedef std::set<std::string> Set; // unconverted histograms
81  // ==========================================================================
82 protected:
83  Gaudi::Property<std::string> m_histPersName{ this, "HistogramPersistency", "", "name of the Hist Pers type" };
84  Gaudi::Property<std::string> m_outputFile{ this, "OutputFile", "", "name of the output file" };
86  this, "ConvertHistos", {}, "The list of patterns to be accepted for conversion" };
88  this, "ExcludeHistos", {}, "The list of patterns to be excluded from conversion" };
89  Gaudi::Property<bool> m_warnings{ this, "Warnings", true, "Set this property to false to suppress warning messages" };
90 
95  // ==========================================================================
96 };
97 // ============================================================================
98 // The END
99 // ============================================================================
100 #endif // PERSISTENCYSVC_HISTOGRAMPERSISTENCYSVC_H
PersistencySvc
PersistencySvc class implementation definition.
Definition: PersistencySvc.h:57
HistogramPersistencySvc::HistogramPersistencySvc
HistogramPersistencySvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
Definition: HistogramPersistencySvc.cpp:212
std::string
STL class.
HistogramPersistencySvc::m_convert
Gaudi::Property< std::vector< std::string > > m_convert
Definition: HistogramPersistencySvc.h:85
HistogramPersistencySvc::createRep
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConverter: Convert the transient object to the requested representation.
Definition: HistogramPersistencySvc.cpp:180
IOpaqueAddress
Definition: IOpaqueAddress.h:33
ISvcLocator
Definition: ISvcLocator.h:46
HistogramPersistencySvc::initialize
StatusCode initialize() override
Initialize the service.
Definition: HistogramPersistencySvc.cpp:92
HistogramPersistencySvc::Set
std::set< std::string > Set
for report: unconverted histograms
Definition: HistogramPersistencySvc.h:80
HistogramPersistencySvc::m_excluded
Set m_excluded
for the final report: the list of excluded histograms
Definition: HistogramPersistencySvc.h:94
Service::name
const std::string & name() const override
Retrieve name of the service
Definition: Service.cpp:332
StatusCode
Definition: StatusCode.h:65
HistogramPersistencySvc::m_converted
Set m_converted
for the final report: the list of converted histograms
Definition: HistogramPersistencySvc.h:92
HistogramPersistencySvc::m_histPersName
Gaudi::Property< std::string > m_histPersName
Definition: HistogramPersistencySvc.h:83
HistogramPersistencySvc::finalize
StatusCode finalize() override
Finalize the service.
Definition: HistogramPersistencySvc.cpp:67
HistogramPersistencySvc::m_warnings
Gaudi::Property< bool > m_warnings
Definition: HistogramPersistencySvc.h:89
HistogramPersistencySvc::reinitialize
StatusCode reinitialize() override
Reinitialize the service.
Definition: HistogramPersistencySvc.cpp:99
HistogramPersistencySvc::m_outputFile
Gaudi::Property< std::string > m_outputFile
Definition: HistogramPersistencySvc.h:84
HistogramPersistencySvc
HistogramPersistencySvc class implementation definition.
Definition: HistogramPersistencySvc.h:57
DataObject
Definition: DataObject.h:36
std::set< std::string >
Gaudi::Property< std::string >
HistogramPersistencySvc::m_exclude
Gaudi::Property< std::vector< std::string > > m_exclude
Definition: HistogramPersistencySvc.h:87