113{
114
115 SvcCatalog* m_clientCatalogue = new SvcCatalog;
116
117 StatusCode sc;
118
119 std::vector<std::string> clients = m_svc->getClients();
120 for ( unsigned int i = 0; i < clients.size(); ++i ) {
121 const std::vector<const Property*>* properties = m_svc->getProperties(clients[i]);
122 for ( unsigned int j = 0; j < properties->size(); ++j ) {
123 const Property* property = properties->at(j);
124
126
128
130
133
134
135
136 StringProperty* tmp= new StringProperty(property->name(), property->toString());
137 sc = m_clientCatalogue->addProperty(clients[i], tmp);
138 if ( sc.isFailure() ) {
139 StringProperty* tmp2 = new StringProperty(property->name(), '"'+property->toString()+'"');
140 m_clientCatalogue->addProperty(clients[i], tmp2);
141 }
142 }
143 }
144
145 StringProperty* tmpservername = new StringProperty("ServerName", '"'+svrName+'"');
146 m_clientCatalogue->addProperty("DistBoss", tmpservername);
147 if ( m_iFileType == 0 ) {
148 StringProperty* tmprunmode = new StringProperty("RunMode", "3");
149 m_clientCatalogue->addProperty("RawDataInputSvc", tmprunmode);
150 }
151
152
153
154
155
156
157 for ( unsigned int i = 0; i < m_oFileTypes.size(); ++i ) {
158 int type = m_oFileTypes[i];
159 if ( type == 3 ) {
160 m_clientCatalogue->addProperty("WriteDst", new StringProperty("RunMode", "3"));
161 }
162 else if ( type == 4 ) {
163 m_clientCatalogue->addProperty("WriteRec", new StringProperty("RunMode", "3"));
164 }
165
166
167
168
169
170
171 }
172
173 std::string client_opt_name = m_optName + ".distboss_client";
174 std::ofstream os(client_opt_name.c_str(), std::ios::out|std::ios::trunc);
175 if ( ! os ) {
176 std::cout << "[JobOptionsMgr] Failed to open client_template file!" << std::endl;
177 exit(1);
178 }
179
180 m_clientCatalogue->fillStream( os );
181
182 delete m_clientCatalogue;
183}
#define ignorePROPERTY(client, pname)