20 using namespace DD4hep;
21 using namespace DD4hep::Conditions;
33 if ( repr.length() > 100 )
38 std::string values = data.
str();
39 if ( values.length() > 132 ) values = values.substr(0,130)+
"...";
40 std::string new_prefix =
prefix;
41 new_prefix.assign(
prefix.length(),
' ');
43 new_prefix.c_str(), cond.
name(), cond.
key(), data.dataType().c_str());
53 container->detector.path().c_str(), int(container.
keys().size()));
54 for(
const auto& k : container.
keys() ) {
56 std::string nam = c.
name();
57 std::string cn = nam.substr(nam.find(
'#')+1);
60 prefix.c_str(),
"Condition:", cn.c_str(), key==k.first ? key : k.first,
61 c.
name(), k.second.first);
66 except(
name,
"Cannot dump conditions container without user-pool.");
OpaqueData & data() const
Access the IOV block.
const char * name() const
Access the object name (or "" if not supported by the object)
virtual int operator()(Condition cond)
Callback to output conditions information.
bool isValid() const
Check the validity of the object held by the handle.
Generic Conditions processor.
Class describing an opaque data block.
Main condition object handle.
Container class for condition handles aggregated by a detector element.
int m_flag
Printout processing and customization flag.
unsigned int key_type
Forward definition of the key type.
Condition get(const std::string &condition_key, const iov_type &iov)
Access to condition objects by key and IOV.
int except(const std::string &src, const std::string &fmt,...)
Calls the display action with ERROR and throws an std::runtime_error exception.
pool_type * m_pool
Reference to the user pool.
T * ptr() const
Access to the held object.
std::string str(int with_data=WITH_IOV|WITH_ADDRESS|WITH_DATATYPE) const
Output method.
const Keys & keys() const
Known keys of conditions in this container.
std::string str() const
Create string representation of the data block.
ConditionsPrinter(const std::string &prefix="", int flag=Condition::NO_NAME|Condition::WITH_IOV|Condition::WITH_ADDRESS)
Initializing constructor.
std::string name
Printer name. Want to know who is printing what.
key_type key() const
Hash identifier.
std::string prefix
Printout prefix.
static key_type hashCode(const char *value)
Hash code generation from input string.
int printout(PrintLevel severity, const char *src, const char *fmt,...)
Calls the display action with a given severity level.