Newer
Older
// $Id$
//==========================================================================
// AIDA Detector description implementation for LCD
//--------------------------------------------------------------------------
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
// All rights reserved.
//
// For the licensing terms see $DD4hepINSTALL/LICENSE.
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
//
// Author : M.Frank
//
//==========================================================================
// Framework includes
#include "DD4hep/Printout.h"
#include "DD4hep/InstanceCount.h"
#include "DD4hep/ConditionsData.h"
#include <sstream>
using namespace DD4hep::Conditions;
/// print Conditions object
std::ostream& operator << (std::ostream& s, const AbstractMap& data) {
struct _Print {
void operator()(const AbstractMap::Params::value_type& obj) const {
const AbstractMap& d= obj.second.get<AbstractMap>();
DD4hep::printout(DD4hep::INFO,"Condition","++ %-16s [%d] %-8s -> %s",
obj.first.c_str(), d.classID,
obj.second.dataType().c_str(),
obj.second.str().c_str());
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
}
};
if ( !data.params.empty() ) {
for_each(data.params.begin(), data.params.end(),_Print());
}
return s;
}
/// Default destructor
ClientData::~ClientData() {
}
/// Copy constructor
AbstractMap::AbstractMap(const AbstractMap& c)
: clientData(c.clientData), params(c.params), classID(c.classID)
{
InstanceCount::increment(this);
}
/// Default constructor
AbstractMap::AbstractMap() : clientData(0) {
InstanceCount::increment(this);
}
/// Default destructor
AbstractMap::~AbstractMap() {
if ( clientData ) clientData->release();
clientData = 0;
InstanceCount::decrement(this);
}
/// Assignment operator
AbstractMap& AbstractMap::operator=(const AbstractMap& c) {
if ( this != &c ) {
clientData = c.clientData;
params = c.params;
classID = c.classID;
}
return *this;
}
#include "DD4hep/ToStream.h"
#include "DD4hep/objects/ConditionsInterna.h"
DD4HEP_DEFINE_CONDITIONS_TYPE_DUMMY(AbstractMap)
#include "DD4hep/BasicGrammar_inl.h"
DD4HEP_DEFINE_PARSER_GRAMMAR(AbstractMap,eval_none<AbstractMap>)